mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-19 15:41:36 +03:00
fix nested mutable value bug
This commit is contained in:
parent
ced02462a0
commit
1217e9860e
@ -229,8 +229,15 @@ impl<F: Field + PrimeField, G: GroupType<F>> ConstrainedValue<F, G> {
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Modifies the `self` [ConstrainedValue] so there are no `mut` keywords wrapping the `self` value.
|
||||
///
|
||||
pub(crate) fn get_inner_mut(&mut self) {
|
||||
if let ConstrainedValue::Mutable(inner) = self {
|
||||
// Recursively remove `mut` keywords.
|
||||
inner.get_inner_mut();
|
||||
|
||||
// Modify the value.
|
||||
*self = *inner.clone()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user