summaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-08-13 14:21:10 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-08-13 14:31:14 -0400
commit4ace27830ffea715c30f366765aeb231572c60ec (patch)
treed07ceb9f445bd4c9601273e1de002addcbd8c645 /src/app.rs
parentbfcdc3fde5a39eb1d51a30c34d31330ea88b242f (diff)
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.
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/app.rs b/src/app.rs
index 133ee04..ab8da7e 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -33,36 +33,36 @@ impl App {
}
impl App {
- pub const fn boot(&self) -> Boot {
+ pub const fn boot(&self) -> Boot<'_> {
Boot::new(&self.db)
}
- pub const fn conversations(&self) -> Conversations {
+ pub const fn conversations(&self) -> Conversations<'_> {
Conversations::new(&self.db, &self.events)
}
- pub const fn events(&self) -> Events {
+ pub const fn events(&self) -> Events<'_> {
Events::new(&self.db, &self.events)
}
- pub const fn invites(&self) -> Invites {
+ pub const fn invites(&self) -> Invites<'_> {
Invites::new(&self.db, &self.events)
}
#[cfg(test)]
- pub const fn users(&self) -> Users {
+ pub const fn users(&self) -> Users<'_> {
Users::new(&self.db, &self.events)
}
- pub const fn messages(&self) -> Messages {
+ pub const fn messages(&self) -> Messages<'_> {
Messages::new(&self.db, &self.events)
}
- pub const fn setup(&self) -> Setup {
+ pub const fn setup(&self) -> Setup<'_> {
Setup::new(&self.db, &self.events)
}
- pub const fn tokens(&self) -> Tokens {
+ pub const fn tokens(&self) -> Tokens<'_> {
Tokens::new(&self.db, &self.token_events)
}
}