diff --git a/utils/zerovec/src/map/kv.rs b/utils/zerovec/src/map/kv.rs index d0992619db2..1b642d30963 100644 --- a/utils/zerovec/src/map/kv.rs +++ b/utils/zerovec/src/map/kv.rs @@ -122,7 +122,7 @@ impl<'a> ZeroMapKV<'a> for str { #[inline] fn owned_as_self(o: &Self::OwnedType) -> &Self { - &o + o } } @@ -150,6 +150,6 @@ impl<'a> ZeroMapKV<'a> for [u8] { #[inline] fn owned_as_self(o: &Self::OwnedType) -> &Self { - &o + o } } diff --git a/utils/zerovec/src/map/serde.rs b/utils/zerovec/src/map/serde.rs index a4867151771..18ed4a6f2a1 100644 --- a/utils/zerovec/src/map/serde.rs +++ b/utils/zerovec/src/map/serde.rs @@ -41,6 +41,7 @@ where /// Modified example from https://serde.rs/deserialize-map.html struct ZeroMapMapVisitor { + #[allow(clippy::type_complexity)] // it's a marker type, complexity doesn't matter marker: PhantomData (Box, Box)>, } diff --git a/utils/zerovec/src/varzerovec/owned.rs b/utils/zerovec/src/varzerovec/owned.rs index 02b51b099de..14131666c0e 100644 --- a/utils/zerovec/src/varzerovec/owned.rs +++ b/utils/zerovec/src/varzerovec/owned.rs @@ -325,21 +325,21 @@ mod test { "five".into(), ]; let mut zerovec: VarZeroVecOwned = VarZeroVecOwned::from_elements(&items); - zerovec.insert(1, &"foo3"); + zerovec.insert(1, "foo3"); items.insert(1, "foo3".into()); assert_eq!(zerovec, &*items); items.insert(0, "1234567890".into()); - zerovec.insert(0, &"1234567890"); + zerovec.insert(0, "1234567890"); assert_eq!(zerovec, &*items); // make sure inserting at the end works items.insert(items.len(), "qwertyuiop".into()); - zerovec.insert(zerovec.len(), &"qwertyuiop"); + zerovec.insert(zerovec.len(), "qwertyuiop"); assert_eq!(zerovec, &*items); items.insert(0, "asdfghjkl;".into()); - zerovec.insert(0, &"asdfghjkl;"); + zerovec.insert(0, "asdfghjkl;"); assert_eq!(zerovec, &*items); } }