summaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/app.rs b/src/app.rs
index e33ee39..3f3885a 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -38,8 +38,8 @@ impl App {
Boot::new(self.db.clone())
}
- pub const fn conversations(&self) -> Conversations<'_> {
- Conversations::new(&self.db, &self.events)
+ pub fn conversations(&self) -> Conversations {
+ Conversations::new(self.db.clone(), self.events.clone())
}
pub const fn events(&self) -> Events<'_> {
@@ -77,3 +77,9 @@ impl FromRef<App> for Boot {
app.boot()
}
}
+
+impl FromRef<App> for Conversations {
+ fn from_ref(app: &App) -> Self {
+ app.conversations()
+ }
+}