File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,8 @@ impl Uint256 {
99
99
Uint256 ( U256 ( words) )
100
100
}
101
101
102
+ /// A conversion from `Uint128` that, unlike the one provided by the `From` trait,
103
+ /// can be used in a `const` context.
102
104
pub const fn from_uint128 ( num : Uint128 ) -> Self {
103
105
let num = num. u128 ( ) ;
104
106
let bytes = num. to_le_bytes ( ) ;
Original file line number Diff line number Diff line change @@ -99,6 +99,8 @@ impl Uint512 {
99
99
Uint512 ( U512 :: from_little_endian ( & value) )
100
100
}
101
101
102
+ /// A conversion from `Uint256` that, unlike the one provided by the `From` trait,
103
+ /// can be used in a `const` context.
102
104
pub const fn from_uint256 ( num : Uint256 ) -> Self {
103
105
let uint256_words = num. to_words ( ) ;
104
106
let words: [ u64 ; 8 ] = [
You can’t perform that action at this time.
0 commit comments