Skip to content

Commit d1d5fac

Browse files
award999ahoppen
andauthored
Update Sources/LanguageServerProtocol/SupportTypes/TextDocumentPlayground.swift
Co-authored-by: Alex Hoppen <alex@alexhoppen.de>
1 parent 9718c60 commit d1d5fac

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sources/LanguageServerProtocol/SupportTypes/TextDocumentPlayground.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ public struct TextDocumentPlayground: ResponseType, Equatable, LSPAnyCodable {
4545
public init?(fromLSPDictionary dictionary: [String: LSPAny]) {
4646
guard
4747
case .string(let id) = dictionary["id"],
48-
case .dictionary(let rangeDict) = dictionary["range"],
49-
let range = Range<Position>(fromLSPDictionary: rangeDict)
48+
let range = Range<Position>(fromLSPAny: dictionary["range"])
5049
else {
5150
return nil
5251
}

0 commit comments

Comments
 (0)