Skip to content

Commit 1624240

Browse files
authored
Use unchecked subtraction in PeerAddress init (#38)
1 parent f41ab27 commit 1624240

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/GRPCOTelTracingInterceptors/Tracing/SpanAttributes+GRPCTracingKeys.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ extension Int {
212212
// non-digit character
213213
return nil
214214
}
215-
value &+= Int(utf8Char - UInt8(ascii: "0"))
215+
value &+= Int(utf8Char &- UInt8(ascii: "0"))
216216
}
217217

218218
guard value <= Int(UInt16.max) else {

0 commit comments

Comments
 (0)