From fa48067d95b6cfe97ca0e8f56da95c562c62417e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Joly?= Date: Fri, 6 Dec 2024 23:09:55 +0000 Subject: [PATCH] chore: clippy fixes - Remove needless lifetimes https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes --- rusqlite_migration/src/builder.rs | 2 +- rusqlite_migration/src/lib.rs | 4 ++-- rusqlite_migration/src/loader.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rusqlite_migration/src/builder.rs b/rusqlite_migration/src/builder.rs index 46fd9a6..a403d50 100644 --- a/rusqlite_migration/src/builder.rs +++ b/rusqlite_migration/src/builder.rs @@ -66,7 +66,7 @@ impl<'u> FromIterator> for MigrationsBuilder<'u> { } } -impl<'u> M<'u> { +impl M<'_> { /// Replace the `up_hook` in the given migration with the provided one. /// /// # Warning diff --git a/rusqlite_migration/src/lib.rs b/rusqlite_migration/src/lib.rs index 3948a85..ddc850f 100644 --- a/rusqlite_migration/src/lib.rs +++ b/rusqlite_migration/src/lib.rs @@ -99,7 +99,7 @@ pub struct M<'u> { comment: Option<&'u str>, } -impl<'u> PartialEq for M<'u> { +impl PartialEq for M<'_> { fn eq(&self, other: &Self) -> bool { let equal_up_hooks = match (self.up_hook.as_ref(), other.up_hook.as_ref()) { (None, None) => true, @@ -121,7 +121,7 @@ impl<'u> PartialEq for M<'u> { } } -impl<'u> Eq for M<'u> {} +impl Eq for M<'_> {} impl<'u> M<'u> { /// Create a schema update. The SQL command will be executed only when the migration has not been diff --git a/rusqlite_migration/src/loader.rs b/rusqlite_migration/src/loader.rs index 1b48b8e..ccdab1b 100644 --- a/rusqlite_migration/src/loader.rs +++ b/rusqlite_migration/src/loader.rs @@ -83,7 +83,7 @@ impl TryFrom<&'static Dir<'static>> for MigrationFile { } } -impl<'u> From<&MigrationFile> for M<'u> { +impl From<&MigrationFile> for M<'_> { fn from(value: &MigrationFile) -> Self { M::up(value.up) .comment(value.name)