Skip to content

Commit d564895

Browse files
committed
Change if to guard
1 parent 3269433 commit d564895

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftProtobuf/GetPathDecoder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ struct GetPathDecoder<T: Message>: Decoder {
4747
}
4848

4949
private mutating func captureValue(_ value: Any?) throws {
50-
if !nextPath.isEmpty {
50+
guard nextPath.isEmpty else {
5151
throw PathDecodingError.pathNotFound
5252
}
5353
self._value = value

0 commit comments

Comments
 (0)