From 4ace27830ffea715c30f366765aeb231572c60ec Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 13 Aug 2025 14:21:10 -0400 Subject: Rust 1.89: Add elided lifetime parameters (`'_`) where appropriate. Rust 1.89 added a new warning: warning: hiding a lifetime that's elided elsewhere is confusing --> src/setup/repo.rs:4:14 | 4 | fn setup(&mut self) -> Setup; | ^^^^^^^^^ ----- the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 4 | fn setup(&mut self) -> Setup<'_>; | ++++ I don't entirely agree with the style advice here, but lifetime elision style is an evolving area in Rust and I'd rather track the Rust team's recommendations than invent my own, so I've added all of them. --- src/setup/repo.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/setup') diff --git a/src/setup/repo.rs b/src/setup/repo.rs index c4f5fd8..e7c61f2 100644 --- a/src/setup/repo.rs +++ b/src/setup/repo.rs @@ -1,11 +1,11 @@ use sqlx::{SqliteConnection, Transaction, sqlite::Sqlite}; pub trait Provider { - fn setup(&mut self) -> Setup; + fn setup(&mut self) -> Setup<'_>; } impl Provider for Transaction<'_, Sqlite> { - fn setup(&mut self) -> Setup { + fn setup(&mut self) -> Setup<'_> { Setup(self) } } -- cgit v1.2.3