Skip to content

Commit 03c77d9

Browse files
committed
docs
1 parent a5135a4 commit 03c77d9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/std/src/math/uint256.rs

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ impl Uint256 {
9999
Uint256(U256(words))
100100
}
101101

102+
/// A conversion from `Uint128` that, unlike the one provided by the `From` trait,
103+
/// can be used in a `const` context.
102104
pub const fn from_uint128(num: Uint128) -> Self {
103105
let num = num.u128();
104106
let bytes = num.to_le_bytes();

packages/std/src/math/uint512.rs

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ impl Uint512 {
9999
Uint512(U512::from_little_endian(&value))
100100
}
101101

102+
/// A conversion from `Uint256` that, unlike the one provided by the `From` trait,
103+
/// can be used in a `const` context.
102104
pub const fn from_uint256(num: Uint256) -> Self {
103105
let uint256_words = num.to_words();
104106
let words: [u64; 8] = [

0 commit comments

Comments
 (0)