From 6de7402a002791c6216b12a40e74af9c8ab82c02 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Mon, 27 Oct 2025 17:33:30 -0400 Subject: Convert the `Events` app component into a freestanding struct. This one doesn't need a FromRef impl at this time, as it's only ever used in a handler that also uses other components and so will need to continue receiving `App`. However, there's little reason not to make the implementatino of the `Events` struct consistent. --- src/event/app.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/event/app.rs') diff --git a/src/event/app.rs b/src/event/app.rs index 7359bfb..8fa760a 100644 --- a/src/event/app.rs +++ b/src/event/app.rs @@ -13,13 +13,13 @@ use crate::{ user::{self, repo::Provider as _}, }; -pub struct Events<'a> { - db: &'a SqlitePool, - events: &'a Broadcaster, +pub struct Events { + db: SqlitePool, + events: Broadcaster, } -impl<'a> Events<'a> { - pub const fn new(db: &'a SqlitePool, events: &'a Broadcaster) -> Self { +impl Events { + pub const fn new(db: SqlitePool, events: Broadcaster) -> Self { Self { db, events } } -- cgit v1.2.3