File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
Sources/SwiftSyntaxMacroExpansion Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -438,17 +438,8 @@ private class AttributeRemover: SyntaxRewriter {
438
438
{
439
439
if !triviaToAttachToNextToken. isEmpty {
440
440
triviaToAttachToNextToken = triviaToAttachToNextToken. trimmingSuffix ( while: \. isSpaceOrTab)
441
- } else {
442
- if let last = filteredAttributes. last {
443
- filteredAttributes =
444
- filteredAttributes. dropLast ( )
445
- + [
446
- last. with (
447
- \. trailingTrivia,
448
- last. trailingTrivia. trimmingSuffix ( while: \. isSpaceOrTab)
449
- )
450
- ]
451
- }
441
+ } else if let lastAttribute = filteredAttributes. last {
442
+ filteredAttributes [ filteredAttributes. count - 1 ] . trailingTrivia = lastAttribute. trailingTrivia. trimmingSuffix ( while: \. isSpaceOrTab)
452
443
}
453
444
}
454
445
return AttributeListSyntax ( filteredAttributes)
You can’t perform that action at this time.
0 commit comments