Skip to content

Commit 9d83f38

Browse files
committed
Remove force unwrapping for source location
Companion of swiftlang/swift-syntax#1532
1 parent ae1670d commit 9d83f38

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/swift-format/Utilities/Diagnostic.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ struct Diagnostic {
3636

3737
/// Creates a new diagnostic location from the given source location.
3838
init(_ sourceLocation: SourceLocation) {
39-
self.file = sourceLocation.file!
40-
self.line = sourceLocation.line!
41-
self.column = sourceLocation.column!
39+
self.file = sourceLocation.file
40+
self.line = sourceLocation.line
41+
self.column = sourceLocation.column
4242
}
4343

4444
/// Creates a new diagnostic location with the given finding location.

0 commit comments

Comments
 (0)