mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-05 23:33:07 +00:00
Remove U256::as_u8 in comment
This commit is contained in:
parent
5acabad72d
commit
08982498d6
@ -70,7 +70,7 @@ pub(crate) fn u256_to_u64<F: Field>(u256: U256) -> Result<(F, F), ProgramError>
|
||||
))
|
||||
}
|
||||
|
||||
/// Safe alternative to `U256::as_u8()`, which errors in case of overflow instead of panicking.
|
||||
/// Safe conversion from U256 to u8, which errors in case of overflow instead of panicking.
|
||||
pub(crate) fn u256_to_u8(u256: U256) -> Result<u8, ProgramError> {
|
||||
u256.try_into().map_err(|_| ProgramError::IntegerTooLarge)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user