Consuming iterator for RpoDigest

This commit is contained in:
Philippe Laferriere 2023-11-07 07:28:47 -05:00 committed by Bobbin Threadbare
parent 9f95582654
commit fd480f827a

View file

@ -302,6 +302,17 @@ impl Deserializable for RpoDigest {
}
}
// ITERATORS
// ================================================================================================
impl IntoIterator for RpoDigest {
type Item = Felt;
type IntoIter = <[Felt; 4] as IntoIterator>::IntoIter;
fn into_iter(self) -> Self::IntoIter {
self.0.into_iter()
}
}
// TESTS
// ================================================================================================