diff --git a/Sources/SpyableMacro/Factories/SpyFactory.swift b/Sources/SpyableMacro/Factories/SpyFactory.swift index e678ab3..6ea8941 100644 --- a/Sources/SpyableMacro/Factories/SpyFactory.swift +++ b/Sources/SpyableMacro/Factories/SpyFactory.swift @@ -166,12 +166,14 @@ struct SpyFactory { } } -private extension SyntaxProtocol { +extension SyntaxProtocol { /// - Returns: `self` with leading space `Trivia` removed. - var removingLeadingSpaces: Self { + fileprivate var removingLeadingSpaces: Self { with( - \.leadingTrivia, Trivia( - pieces: leadingTrivia + \.leadingTrivia, + Trivia( + pieces: + leadingTrivia .filter { if case .spaces = $0 { false @@ -179,7 +181,7 @@ private extension SyntaxProtocol { true } } - ) + ) ) } }