Skip to content

Commit a3bfed4

Browse files
authored
Merge pull request swiftlang#8 from adamnemecek/second
trimmed whitespace
2 parents 2d25461 + 97fd1e8 commit a3bfed4

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

Sources/LanguageServerProtocol/Connection.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ public protocol _IndirectConnection: Connection {
4646

4747
/// An abstract message handler, such as a language server or client.
4848
public protocol MessageHandler: AnyObject {
49-
49+
5050
/// Handle a notification without a reply.
5151
func handle<Notification>(_: Notification, from: ObjectIdentifier) where Notification: NotificationType
52-
52+
5353
/// Handle a request and (asynchronously) receive a reply.
5454
func handle<Request>(_: Request, id: RequestID, from: ObjectIdentifier, reply: @escaping (LSPResult<Request.Response>) -> ()) where Request: RequestType
5555
}

Sources/LanguageServerProtocol/DocumentHighlight.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ public struct DocumentHighlight: ResponseType, Hashable {
2828
self.range = range
2929
self.kind = kind
3030
}
31-
}
31+
}

Sources/LanguageServerProtocol/ServerCapabilities.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public struct ServerCapabilities: Codable, Hashable {
7676
} else if let kind = try? container.decode(TextDocumentSyncKind.self, forKey: .textDocumentSync) {
7777
// Legacy response
7878
self.textDocumentSync = TextDocumentSyncOptions(openClose: nil, change: kind, willSave: nil, willSaveWaitUntil: nil, save: nil)
79-
79+
8080
} else {
8181
self.textDocumentSync = nil
8282
}

Sources/SKCore/ExternalWorkspace.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ public protocol ExternalWorkspace {
2626

2727
/// The path to put the index database, if any.
2828
var indexDatabasePath: AbsolutePath? { get }
29-
}
29+
}

Sources/SKSupport/Cancellation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public final class CancellationToken {
1616
public var isCancelled: Bool { return false }
1717

1818
public init() {}
19-
19+
2020
public func addCancellationHandler(_ handler: @escaping () -> ()) {
2121

2222
}

Sources/SKSupport/LineTable.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public struct LineTable: Hashable {
121121
@inlinable
122122
func nextLineStart(_ line: Int) -> String.Index {
123123
if line == count - 1 {
124-
return content.endIndex
124+
return content.endIndex
125125
} else {
126126
return impl[line + 1].stringIndex
127127
}
@@ -153,9 +153,9 @@ extension LineTable {
153153
mutating public func replace(
154154
fromLine: Int,
155155
utf16Offset fromOff: Int,
156-
toLine: Int,
157-
utf16Offset toOff: Int,
158-
with replacement: String)
156+
toLine: Int,
157+
utf16Offset toOff: Int,
158+
with replacement: String)
159159
{
160160
let start = String.Index(encodedOffset: self[fromLine].utf16Offset + fromOff)
161161
let end = String.Index(encodedOffset: self[toLine].utf16Offset + toOff)
@@ -177,7 +177,7 @@ extension LineTable {
177177
fromLine: Int,
178178
utf16Offset fromOff: Int,
179179
utf16Length: Int,
180-
with replacement: String)
180+
with replacement: String)
181181
{
182182
let endOff = self[fromLine].utf16Offset + fromOff + utf16Length
183183
let endLine = self[utf16Offset: endOff]

Sources/SKSupport/Random.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ public struct SimpleLCG: RandomNumberGenerator {
2222
public mutating func next() -> UInt64 {
2323
state = state &* 6364136223846793005 &+ 1442695040888963407
2424
return state
25-
}
26-
}
25+
}
26+
}

0 commit comments

Comments
 (0)