From 28684a348b6265ddb9e3fe8baa7d516d608aaaac Mon Sep 17 00:00:00 2001 From: Micah Date: Thu, 5 Dec 2024 11:36:24 -0800 Subject: [PATCH] Lifetime lints? In this economy? --- rbx_binary/src/deserializer/mod.rs | 2 +- rbx_binary/src/serializer/mod.rs | 2 +- rbx_reflection/src/database.rs | 4 ++-- rbx_reflector/src/cli/defaults_place.rs | 2 +- rbx_types/src/attributes/mod.rs | 4 ++-- rbx_types/src/referent.rs | 2 +- rbx_types/src/unique_id.rs | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/rbx_binary/src/deserializer/mod.rs b/rbx_binary/src/deserializer/mod.rs index 4ff1d4d8..872c3950 100644 --- a/rbx_binary/src/deserializer/mod.rs +++ b/rbx_binary/src/deserializer/mod.rs @@ -95,7 +95,7 @@ impl<'db> Deserializer<'db> { } } -impl<'db> Default for Deserializer<'db> { +impl Default for Deserializer<'_> { fn default() -> Self { Self::new() } diff --git a/rbx_binary/src/serializer/mod.rs b/rbx_binary/src/serializer/mod.rs index 02a1b56c..fdbbdcc1 100644 --- a/rbx_binary/src/serializer/mod.rs +++ b/rbx_binary/src/serializer/mod.rs @@ -94,7 +94,7 @@ impl<'db> Serializer<'db> { } } -impl<'db> Default for Serializer<'db> { +impl Default for Serializer<'_> { fn default() -> Self { Self::new() } diff --git a/rbx_reflection/src/database.rs b/rbx_reflection/src/database.rs index 26425e63..575d9b5e 100644 --- a/rbx_reflection/src/database.rs +++ b/rbx_reflection/src/database.rs @@ -63,7 +63,7 @@ impl<'a> ReflectionDatabase<'a> { pub fn superclasses( &'a self, descriptor: &'a ClassDescriptor<'a>, - ) -> Option> { + ) -> Option>> { // As of the time of writing (14 March 2024), the class with the most // superclasses has 6 of them. let mut list = Vec::with_capacity(6); @@ -79,7 +79,7 @@ impl<'a> ReflectionDatabase<'a> { /// Returns an iterator of superclasses for the provided ClassDescriptor. This /// iterator will start with the provided class and end with `Instance`. - pub fn superclasses_iter(&'a self, descriptor: &'a ClassDescriptor<'a>) -> SuperClassIter { + pub fn superclasses_iter(&'a self, descriptor: &'a ClassDescriptor<'a>) -> SuperClassIter<'a> { SuperClassIter { database: self, descriptor: Some(descriptor), diff --git a/rbx_reflector/src/cli/defaults_place.rs b/rbx_reflector/src/cli/defaults_place.rs index 084f88ba..34b0a9c4 100644 --- a/rbx_reflector/src/cli/defaults_place.rs +++ b/rbx_reflector/src/cli/defaults_place.rs @@ -267,7 +267,7 @@ impl<'a> PluginInjector<'a> { } } -impl<'a> Drop for PluginInjector<'a> { +impl Drop for PluginInjector<'_> { fn drop(&mut self) { log::info!("Uninstalling Studio plugin"); diff --git a/rbx_types/src/attributes/mod.rs b/rbx_types/src/attributes/mod.rs index 6432f575..66752d08 100644 --- a/rbx_types/src/attributes/mod.rs +++ b/rbx_types/src/attributes/mod.rs @@ -181,7 +181,7 @@ pub struct AttributesDrain<'a> { inner: &'a mut Attributes, } -impl<'a> Iterator for AttributesDrain<'a> { +impl Iterator for AttributesDrain<'_> { type Item = (String, Variant); fn next(&mut self) -> Option { @@ -189,7 +189,7 @@ impl<'a> Iterator for AttributesDrain<'a> { } } -impl<'a> Drop for AttributesDrain<'a> { +impl Drop for AttributesDrain<'_> { fn drop(&mut self) { self.inner.clear() } diff --git a/rbx_types/src/referent.rs b/rbx_types/src/referent.rs index 555708e7..ece3fc5a 100644 --- a/rbx_types/src/referent.rs +++ b/rbx_types/src/referent.rs @@ -84,7 +84,7 @@ mod serde_impl { struct RefVisitor; - impl<'de> Visitor<'de> for RefVisitor { + impl Visitor<'_> for RefVisitor { type Value = Ref; fn expecting(&self, out: &mut fmt::Formatter) -> fmt::Result { diff --git a/rbx_types/src/unique_id.rs b/rbx_types/src/unique_id.rs index eb392a7e..e9a0be95 100644 --- a/rbx_types/src/unique_id.rs +++ b/rbx_types/src/unique_id.rs @@ -179,7 +179,7 @@ mod serde_impl { struct HumanVisitor; struct NonHumanVisitor; - impl<'de> de::Visitor<'de> for HumanVisitor { + impl de::Visitor<'_> for HumanVisitor { type Value = UniqueId; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -194,7 +194,7 @@ mod serde_impl { } } - impl<'de> de::Visitor<'de> for NonHumanVisitor { + impl de::Visitor<'_> for NonHumanVisitor { type Value = UniqueId; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {