From 714ff2a620e11ea0f2052d568472abb0badff79e Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Tue, 7 May 2024 11:45:39 -0700 Subject: [PATCH] Adjustment because `trimmedRange` is not available in swift-syntax `release/6.0` --- .../Swift/CodeActions/ConvertJSONToCodableStruct.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/SourceKitLSP/Swift/CodeActions/ConvertJSONToCodableStruct.swift b/Sources/SourceKitLSP/Swift/CodeActions/ConvertJSONToCodableStruct.swift index 73f58362..82c35ade 100644 --- a/Sources/SourceKitLSP/Swift/CodeActions/ConvertJSONToCodableStruct.swift +++ b/Sources/SourceKitLSP/Swift/CodeActions/ConvertJSONToCodableStruct.swift @@ -110,7 +110,10 @@ public struct ConvertJSONToCodableStruct: EditRefactoringProvider { // Closures are replaced entirely, since they were invalid code to // start with. return [ - SourceEdit(range: closure.trimmedRange, replacement: decls.description) + SourceEdit( + range: closure.positionAfterSkippingLeadingTrivia..