diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-10-27 17:33:30 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-10-28 01:27:13 -0400 |
| commit | 6de7402a002791c6216b12a40e74af9c8ab82c02 (patch) | |
| tree | ab937f60b96fc18933d43377b951755cb833c781 /src/event | |
| parent | 398bc79a3f1f4316e6cc33b6e6bce133c1db3e4c (diff) | |
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.
Diffstat (limited to 'src/event')
| -rw-r--r-- | src/event/app.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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 } } |
