diff --git a/src/core/prefixer.rs b/src/core/prefixer.rs index 0c6a95a..270b4d5 100644 --- a/src/core/prefixer.rs +++ b/src/core/prefixer.rs @@ -599,7 +599,7 @@ mod test { let prefixer = Prefixer::new(Some(&ked), None, Some(code), None, None, None, None).unwrap(); let mut map = ked.to_map().unwrap(); - map.remove("k"); + map.swap_remove("k"); ked = dat!(&map); assert!(!prefixer.verify(&ked, None).unwrap()); diff --git a/src/core/saider.rs b/src/core/saider.rs index d9d61e8..abd3cf0 100644 --- a/src/core/saider.rs +++ b/src/core/saider.rs @@ -76,7 +76,7 @@ fn derive( let mut map = sad.to_map()?; for key in ignore.unwrap_or(&[]) { if map.contains_key(*key) { - map.remove(*key); + map.swap_remove(*key); } } let ser = dat!(&map);