From ef5c3cdb7363ac83d89313eb97d6f6061aa5391d Mon Sep 17 00:00:00 2001 From: blackshirt Date: Thu, 3 Aug 2023 14:18:21 +0700 Subject: [PATCH] math.unsigned: change uint256_from_dec_str to return a result, instead of an option (#19041) --- vlib/math/unsigned/uint256.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/math/unsigned/uint256.v b/vlib/math/unsigned/uint256.v index 5d49a0ed2a2954..8b8bf344f9c9c3 100644 --- a/vlib/math/unsigned/uint256.v +++ b/vlib/math/unsigned/uint256.v @@ -382,7 +382,7 @@ pub fn (u_ Uint256) str() string { } // uint256_from_dec_str creates a new `unsigned.Uint256` from the given string if possible -pub fn uint256_from_dec_str(value string) ?Uint256 { +pub fn uint256_from_dec_str(value string) !Uint256 { mut res := unsigned.uint256_zero for b_ in value.bytes() { b := b_ - '0'.bytes()[0]