diff options
author | bptato <nincsnevem662@gmail.com> | 2024-04-26 16:19:09 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-04-26 16:24:27 +0200 |
commit | c1bcb8a4d833d035eb199546aabc44dbe10252c6 (patch) | |
tree | 4a2acaadf7f4ef4d4ccb32e3e6e558141d26d73e /src/utils/twtstr.nim | |
parent | d93c5700d432afc265fab1fbfef663f77361635d (diff) | |
download | chawan-c1bcb8a4d833d035eb199546aabc44dbe10252c6.tar.gz |
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.
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r-- | src/utils/twtstr.nim | 2 |
1 files changed, 1 insertions, 1 deletions
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 |