From c1bcb8a4d833d035eb199546aabc44dbe10252c6 Mon Sep 17 00:00:00 2001 From: bptato Date: Fri, 26 Apr 2024 16:19:09 +0200 Subject: Remove unnecessary unsigned casts Unsigned operations and conversions to unsigned types always wrap/narrow without checks, so no need to manually mask/cast/etc. them. --- src/utils/twtstr.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils/twtstr.nim') diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index 6cab9ac7..b1c6d1c9 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -91,7 +91,7 @@ func pushHex*(buf: var string; u: uint8) = buf &= HexCharsUpper[u and 0xF] func pushHex*(buf: var string; c: char) = - buf.pushHex(cast[uint8](c)) + buf.pushHex(uint8(c)) func toHexLower*(u: uint16): string = var x = u -- cgit 1.4.1-2-gfad0