Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman authored May 8, 2024
1 parent 9353cb3 commit 6310cf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vlib/math/unsigned/uint128.v
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,10 @@ pub fn uint128_new(lo u64, hi u64) Uint128 {
// The `_` character is allowed as a separator.
pub fn uint128_from_dec_str(value string) !Uint128 {
mut res := unsigned.uint128_zero
underscore := '_'[0]
underscore := `_`

for b_ in value.bytes() {
b := b_ - '0'[0]
b := b_ - `0`
if b < 0 || b > 9 {
// allow _ as a separator in decimal strings
if b_ == underscore {
Expand Down

0 comments on commit 6310cf2

Please sign in to comment.