Skip to content

Commit

Permalink
Lifetime lints? In this economy?
Browse files Browse the repository at this point in the history
  • Loading branch information
Dekkonot committed Dec 5, 2024
1 parent 4822d2a commit 28684a3
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion rbx_binary/src/deserializer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl<'db> Deserializer<'db> {
}
}

impl<'db> Default for Deserializer<'db> {
impl Default for Deserializer<'_> {
fn default() -> Self {
Self::new()
}
Expand Down
2 changes: 1 addition & 1 deletion rbx_binary/src/serializer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl<'db> Serializer<'db> {
}
}

impl<'db> Default for Serializer<'db> {
impl Default for Serializer<'_> {
fn default() -> Self {
Self::new()
}
Expand Down
4 changes: 2 additions & 2 deletions rbx_reflection/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl<'a> ReflectionDatabase<'a> {
pub fn superclasses(
&'a self,
descriptor: &'a ClassDescriptor<'a>,
) -> Option<Vec<&ClassDescriptor>> {
) -> Option<Vec<&'a ClassDescriptor<'a>>> {
// 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);
Expand All @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion rbx_reflector/src/cli/defaults_place.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
4 changes: 2 additions & 2 deletions rbx_types/src/attributes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ 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<Self::Item> {
self.inner.data.pop_first()
}
}

impl<'a> Drop for AttributesDrain<'a> {
impl Drop for AttributesDrain<'_> {
fn drop(&mut self) {
self.inner.clear()
}
Expand Down
2 changes: 1 addition & 1 deletion rbx_types/src/referent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions rbx_types/src/unique_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 28684a3

Please sign in to comment.