Remove U256::as_u8 in comment

This commit is contained in:
4l0n50 2023-12-15 17:13:52 +01:00
parent 5acabad72d
commit 08982498d6

View File

@ -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)
}