mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-10 01:33:07 +00:00
Reabse to main
This commit is contained in:
commit
0ae56db0f2
@ -1,4 +1,4 @@
|
||||
use std::collections::{BTreeSet, HashMap, HashMap, HashSet};
|
||||
use std::collections::{BTreeSet, HashMap};
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::Arc;
|
||||
|
||||
|
||||
@ -80,11 +80,6 @@ pub(crate) fn u256_to_usize(u256: U256) -> Result<usize, ProgramError> {
|
||||
u256.try_into().map_err(|_| ProgramError::IntegerTooLarge)
|
||||
}
|
||||
|
||||
/// Converts a `U256` to a `u8`, erroring in case of overlow instead of panicking.
|
||||
pub(crate) fn u256_to_u8(u256: U256) -> Result<u8, ProgramError> {
|
||||
u256.try_into().map_err(|_| ProgramError::IntegerTooLarge)
|
||||
}
|
||||
|
||||
/// Converts a `U256` to a `bool`, erroring in case of overlow instead of panicking.
|
||||
pub(crate) fn u256_to_bool(u256: U256) -> Result<bool, ProgramError> {
|
||||
if u256 == U256::zero() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user