diff options
author | Vika <vika@fireburn.ru> | 2024-08-26 20:25:20 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2024-08-26 20:25:20 +0300 |
commit | 806f5fbfabd914d27ff3fb2e822e1c3869068859 (patch) | |
tree | cc805cfb7ef5af3d7e26075106d2663e5ca2dd67 /src/database/memory.rs | |
parent | 14e58b4137f8f77af43cad8b712596c2e1ab7e8a (diff) | |
download | kittybox-806f5fbfabd914d27ff3fb2e822e1c3869068859.tar.zst |
Set MSRV to 1.75, remove #[async_trait] declarations whenever possible
Axum still uses `async_trait`, let them do whatever they want. I will no longer be subject to the humiliation of trying to dig through lifetime errors and unreadable declarations. Also I don't fucking care about MSRV, I'm not a library. If you don't have modern Rust, get one.
Diffstat (limited to 'src/database/memory.rs')
-rw-r--r-- | src/database/memory.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/database/memory.rs b/src/database/memory.rs index be37fed..a4ffc7b 100644 --- a/src/database/memory.rs +++ b/src/database/memory.rs @@ -1,5 +1,4 @@ #![allow(clippy::todo)] -use async_trait::async_trait; use futures_util::FutureExt; use serde_json::json; use std::collections::HashMap; @@ -14,7 +13,6 @@ pub struct MemoryStorage { pub channels: Arc<RwLock<HashMap<url::Url, Vec<String>>>>, } -#[async_trait] impl Storage for MemoryStorage { async fn new(_url: &url::Url) -> Result<Self> { Ok(Self::default()) @@ -220,12 +218,12 @@ impl Storage for MemoryStorage { } #[allow(unused_variables)] - async fn get_setting<S: settings::Setting<'a>, 'a>(&'_ self, user: &url::Url) -> Result<S> { + async fn get_setting<S: settings::Setting>(&'_ self, user: &url::Url) -> Result<S> { todo!() } #[allow(unused_variables)] - async fn set_setting<S: settings::Setting<'a> + 'a, 'a>(&self, user: &'a url::Url, value: S::Data) -> Result<()> { + async fn set_setting<S: settings::Setting>(&self, user: &url::Url, value: S::Data) -> Result<()> { todo!() } |