Skip to content

Commit

Permalink
fix clippy::needless-lifetimes warnings
Browse files Browse the repository at this point in the history
by removing the binders for inferrable lifetimes
  • Loading branch information
kcsongor authored and evan-gray committed Dec 2, 2024
1 parent 02cdf9e commit 347357b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion cosmwasm/packages/accountant/src/state/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl KeyDeserialize for Key {
}
}

impl<'a> PrimaryKey<'a> for Key {
impl PrimaryKey<'_> for Key {
type Prefix = (u16, u16);
type SubPrefix = u16;
type Suffix = TokenAddress;
Expand Down
4 changes: 2 additions & 2 deletions cosmwasm/packages/accountant/src/state/addr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl KeyDeserialize for TokenAddress {
}
}

impl<'a> PrimaryKey<'a> for TokenAddress {
impl PrimaryKey<'_> for TokenAddress {
type Prefix = ();
type SubPrefix = ();
type Suffix = Self;
Expand All @@ -121,7 +121,7 @@ impl<'a> PrimaryKey<'a> for TokenAddress {
}
}

impl<'a> Prefixer<'a> for TokenAddress {
impl Prefixer<'_> for TokenAddress {
fn prefix(&self) -> Vec<Key> {
vec![Key::Ref(&**self)]
}
Expand Down
2 changes: 1 addition & 1 deletion cosmwasm/packages/accountant/src/state/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl KeyDeserialize for Key {
}
}

impl<'a> PrimaryKey<'a> for Key {
impl PrimaryKey<'_> for Key {
type Prefix = (u16, TokenAddress);
type SubPrefix = u16;
type Suffix = u64;
Expand Down
6 changes: 3 additions & 3 deletions cosmwasm/packages/cw_transcode/src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ pub struct Transcoder<'a> {
event: Event,
}

impl<'a> Transcoder<'a> {
impl Transcoder<'_> {
fn serialize_field<T>(&mut self, k: &'static str, v: &T) -> Result<(), Error>
where
T: ?Sized + Serialize,
Expand All @@ -285,7 +285,7 @@ impl<'a> Transcoder<'a> {
}
}

impl<'a> SerializeStruct for Transcoder<'a> {
impl SerializeStruct for Transcoder<'_> {
type Ok = ();
type Error = Error;

Expand All @@ -303,7 +303,7 @@ impl<'a> SerializeStruct for Transcoder<'a> {
}
}

impl<'a> SerializeStructVariant for Transcoder<'a> {
impl SerializeStructVariant for Transcoder<'_> {
type Ok = ();
type Error = Error;

Expand Down
8 changes: 4 additions & 4 deletions sdk/rust/serde_wormhole/src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ macro_rules! deserialize_be_number {
}};
}

impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
impl<'de> de::Deserializer<'de> for &mut Deserializer<'de> {
type Error = Error;

fn deserialize_any<V>(self, _: V) -> Result<V::Value, Self::Error>
Expand Down Expand Up @@ -338,7 +338,7 @@ impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
}
}

impl<'de, 'a> VariantAccess<'de> for &'a mut Deserializer<'de> {
impl<'de> VariantAccess<'de> for &mut Deserializer<'de> {
type Error = Error;

#[inline]
Expand Down Expand Up @@ -386,7 +386,7 @@ impl<'de, 'a> BoundedSequence<'de, 'a> {
}
}

impl<'de, 'a> SeqAccess<'de> for BoundedSequence<'de, 'a> {
impl<'de> SeqAccess<'de> for BoundedSequence<'de, '_> {
type Error = Error;

fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Self::Error>
Expand All @@ -407,7 +407,7 @@ impl<'de, 'a> SeqAccess<'de> for BoundedSequence<'de, 'a> {
}
}

impl<'de, 'a> MapAccess<'de> for BoundedSequence<'de, 'a> {
impl<'de> MapAccess<'de> for BoundedSequence<'de, '_> {
type Error = Error;

fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Self::Error>
Expand Down
16 changes: 8 additions & 8 deletions sdk/rust/serde_wormhole/src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl<W: Write> Serializer<W> {
}
}

impl<'a, W: Write> ser::Serializer for &'a mut Serializer<W> {
impl<W: Write> ser::Serializer for &mut Serializer<W> {
type Ok = ();
type Error = Error;

Expand Down Expand Up @@ -270,7 +270,7 @@ impl<'a, W: Write> ser::Serializer for &'a mut Serializer<W> {
}
}

impl<'a, W: Write> ser::SerializeSeq for &'a mut Serializer<W> {
impl<W: Write> ser::SerializeSeq for &mut Serializer<W> {
type Ok = ();
type Error = Error;

Expand All @@ -288,7 +288,7 @@ impl<'a, W: Write> ser::SerializeSeq for &'a mut Serializer<W> {
}
}

impl<'a, W: Write> ser::SerializeTuple for &'a mut Serializer<W> {
impl<W: Write> ser::SerializeTuple for &mut Serializer<W> {
type Ok = ();
type Error = Error;

Expand All @@ -306,7 +306,7 @@ impl<'a, W: Write> ser::SerializeTuple for &'a mut Serializer<W> {
}
}

impl<'a, W: Write> ser::SerializeTupleStruct for &'a mut Serializer<W> {
impl<W: Write> ser::SerializeTupleStruct for &mut Serializer<W> {
type Ok = ();
type Error = Error;

Expand All @@ -324,7 +324,7 @@ impl<'a, W: Write> ser::SerializeTupleStruct for &'a mut Serializer<W> {
}
}

impl<'a, W: Write> ser::SerializeTupleVariant for &'a mut Serializer<W> {
impl<W: Write> ser::SerializeTupleVariant for &mut Serializer<W> {
type Ok = ();
type Error = Error;

Expand All @@ -342,7 +342,7 @@ impl<'a, W: Write> ser::SerializeTupleVariant for &'a mut Serializer<W> {
}
}

impl<'a, W: Write> ser::SerializeStruct for &'a mut Serializer<W> {
impl<W: Write> ser::SerializeStruct for &mut Serializer<W> {
type Ok = ();
type Error = Error;

Expand All @@ -360,7 +360,7 @@ impl<'a, W: Write> ser::SerializeStruct for &'a mut Serializer<W> {
}
}

impl<'a, W: Write> ser::SerializeStructVariant for &'a mut Serializer<W> {
impl<W: Write> ser::SerializeStructVariant for &mut Serializer<W> {
type Ok = ();
type Error = Error;

Expand All @@ -378,7 +378,7 @@ impl<'a, W: Write> ser::SerializeStructVariant for &'a mut Serializer<W> {
}
}

impl<'a, W: Write> ser::SerializeMap for &'a mut Serializer<W> {
impl<W: Write> ser::SerializeMap for &mut Serializer<W> {
type Ok = ();
type Error = Error;

Expand Down

0 comments on commit 347357b

Please sign in to comment.