mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-19 15:41:36 +03:00
perf: make Address is_constant method faster
Signed-off-by: ljedrz <ljedrz@gmail.com>
This commit is contained in:
parent
afe669babd
commit
e5f47b8254
@ -60,13 +60,7 @@ impl Address {
|
||||
}
|
||||
|
||||
pub(crate) fn is_constant(&self) -> bool {
|
||||
let mut result = true;
|
||||
|
||||
for byte in self.bytes.iter() {
|
||||
result = result && byte.is_constant()
|
||||
}
|
||||
|
||||
result
|
||||
self.bytes.iter().all(|byte| byte.is_constant())
|
||||
}
|
||||
|
||||
pub(crate) fn from_input<F: Field + PrimeField, G: GroupType<F>, CS: ConstraintSystem<F>>(
|
||||
|
Loading…
Reference in New Issue
Block a user