mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 05:06:53 +00:00
simplify service trait bounds and lifetimes
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
16014e1594
commit
2db017af37
2 files changed
+13
-18
No files matched your search
@@ -193,16 +193,16 @@ impl Services {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn try_get<'a, 'b, T>(&'b self, name: &'a str) -> Result<Arc<T>>
|
||||
pub fn try_get<T>(&self, name: &str) -> Result<Arc<T>>
|
||||
where
|
||||
T: Send + Sync + 'a + 'b + 'static,
|
||||
T: Any + Send + Sync + Sized,
|
||||
{
|
||||
service::try_get::<T>(&self.service, name)
|
||||
}
|
||||
|
||||
pub fn get<'a, 'b, T>(&'b self, name: &'a str) -> Option<Arc<T>>
|
||||
pub fn get<T>(&self, name: &str) -> Option<Arc<T>>
|
||||
where
|
||||
T: Send + Sync + 'a + 'b + 'static,
|
||||
T: Any + Send + Sync + Sized,
|
||||
{
|
||||
service::get::<T>(&self.service, name)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user