refactor: refactor to clean up and simplify things

This commit is contained in:
tohrnii
2023-06-13 10:28:15 +01:00
parent fe9aa8c28c
commit 0e0a3fda4f
6 changed files with 197 additions and 228 deletions

View File

@@ -102,3 +102,7 @@ const fn int_to_node(value: u64) -> RpoDigest {
const fn int_to_leaf(value: u64) -> Word {
[Felt::new(value), ZERO, ZERO, ZERO]
}
pub fn digests_to_words(digests: &[RpoDigest]) -> Vec<Word> {
digests.iter().map(|d| d.into()).collect()
}