Skip to content

Commit 8d76195

Browse files
committed
Merge pull request #513 from kimdv/kimdv/remove-ComputedLocation
[SwiftSyntax] Remove force unwrapping for source location
1 parent 65c8636 commit 8d76195

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)