diff options
Diffstat (limited to 'src/app.rs')
| -rw-r--r-- | src/app.rs | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,4 @@ +use axum::extract::FromRef; use sqlx::sqlite::SqlitePool; #[cfg(test)] @@ -33,8 +34,8 @@ impl App { } impl App { - pub const fn boot(&self) -> Boot<'_> { - Boot::new(&self.db) + pub fn boot(&self) -> Boot { + Boot::new(self.db.clone()) } pub const fn conversations(&self) -> Conversations<'_> { @@ -70,3 +71,9 @@ impl App { Users::new(&self.db, &self.events) } } + +impl FromRef<App> for Boot { + fn from_ref(app: &App) -> Self { + app.boot() + } +} |
