mirror of
https://github.com/arnaucube/miden-crypto.git
synced 2026-01-11 08:31:30 +01:00
chore: handle deprecations in winterfell 0.8.3 release
This commit is contained in:
committed by
Paul Schoenfelder
parent
4bc4bea0db
commit
999a64fca6
@@ -1,9 +1,8 @@
|
||||
use core::cell::RefCell;
|
||||
|
||||
use super::{
|
||||
boxed::*,
|
||||
collections::{btree_map::*, *},
|
||||
use alloc::{
|
||||
boxed::Box,
|
||||
collections::{BTreeMap, BTreeSet},
|
||||
};
|
||||
use core::cell::RefCell;
|
||||
|
||||
// KEY-VALUE MAP TRAIT
|
||||
// ================================================================================================
|
||||
@@ -202,7 +201,7 @@ impl<K: Clone + Ord, V: Clone> FromIterator<(K, V)> for RecordingMap<K, V> {
|
||||
|
||||
impl<K: Clone + Ord, V: Clone> IntoIterator for RecordingMap<K, V> {
|
||||
type Item = (K, V);
|
||||
type IntoIter = IntoIter<K, V>;
|
||||
type IntoIter = alloc::collections::btree_map::IntoIter<K, V>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
self.data.into_iter()
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
//! Utilities used in this crate which can also be generally useful downstream.
|
||||
|
||||
use alloc::string::String;
|
||||
use core::fmt::{self, Display, Write};
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
pub use std::{format, vec};
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
pub use alloc::{format, vec};
|
||||
|
||||
use super::Word;
|
||||
use crate::utils::string::*;
|
||||
|
||||
mod kv_map;
|
||||
|
||||
@@ -21,8 +15,6 @@ pub use winter_utils::{
|
||||
};
|
||||
|
||||
pub mod collections {
|
||||
pub use winter_utils::collections::*;
|
||||
|
||||
pub use super::kv_map::*;
|
||||
}
|
||||
|
||||
@@ -102,12 +94,11 @@ pub fn hex_to_bytes<const N: usize>(value: &str) -> Result<[u8; N], HexParseErro
|
||||
});
|
||||
|
||||
let mut decoded = [0u8; N];
|
||||
#[allow(clippy::needless_range_loop)]
|
||||
for pos in 0..N {
|
||||
for byte in decoded.iter_mut() {
|
||||
// These `unwrap` calls are okay because the length was checked above
|
||||
let high: u8 = data.next().unwrap()?;
|
||||
let low: u8 = data.next().unwrap()?;
|
||||
decoded[pos] = (high << 4) + low;
|
||||
*byte = (high << 4) + low;
|
||||
}
|
||||
|
||||
Ok(decoded)
|
||||
|
||||
Reference in New Issue
Block a user