Skip to content

Commit ef5c3cd

Browse files
authored
math.unsigned: change uint256_from_dec_str to return a result, instead of an option (#19041)
1 parent 5ec7ee9 commit ef5c3cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vlib/math/unsigned/uint256.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ pub fn (u_ Uint256) str() string {
382382
}
383383

384384
// uint256_from_dec_str creates a new `unsigned.Uint256` from the given string if possible
385-
pub fn uint256_from_dec_str(value string) ?Uint256 {
385+
pub fn uint256_from_dec_str(value string) !Uint256 {
386386
mut res := unsigned.uint256_zero
387387
for b_ in value.bytes() {
388388
b := b_ - '0'.bytes()[0]

0 commit comments

Comments
 (0)