summaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-10-28 15:22:29 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-10-28 15:22:29 -0400
commit3c588861ef5814de329743147398dbae22c1aeeb (patch)
tree3ae5ac8d432a384fbc839b414d25f7567022ba3f /src/app.rs
parentf866e480447746ce4958e5475d3c9e407812231f (diff)
Fix merge mistakes and make the `Vapid` component freestanding.
In 4a91792e023a5877f8ac9b8a352e99c4486d698f, I merged in the app component struct changes, but neglected to notice that the `app.vapid()` method had ended up attached to the wrong impl block during the merge. This fixes that. I've also carried the change to component structs through, so `Vapid` is now a freestanding component, rather than a view of the `App` struct's internals.
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 8f16e02..2bfabbe 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -71,6 +71,10 @@ impl App {
pub fn users(&self) -> Users {
Users::new(self.db.clone(), self.events.clone())
}
+
+ pub fn vapid(&self) -> Vapid {
+ Vapid::new(self.db.clone(), self.events.clone())
+ }
}
impl FromRef<App> for Boot {
@@ -113,8 +117,10 @@ impl FromRef<App> for Tokens {
fn from_ref(app: &App) -> Self {
app.tokens()
}
+}
- pub const fn vapid(&self) -> Vapid<'_> {
- Vapid::new(&self.db, &self.events)
+impl FromRef<App> for Vapid {
+ fn from_ref(app: &App) -> Self {
+ app.vapid()
}
}