about summary refs log tree commit diff
path: root/src/database/file
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2024-08-26 20:25:20 +0300
committerVika <vika@fireburn.ru>2024-08-26 20:25:20 +0300
commit806f5fbfabd914d27ff3fb2e822e1c3869068859 (patch)
treecc805cfb7ef5af3d7e26075106d2663e5ca2dd67 /src/database/file
parent14e58b4137f8f77af43cad8b712596c2e1ab7e8a (diff)
downloadkittybox-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/file')
-rw-r--r--src/database/file/mod.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/database/file/mod.rs b/src/database/file/mod.rs
index 117ba17..10d6079 100644
--- a/src/database/file/mod.rs
+++ b/src/database/file/mod.rs
@@ -1,7 +1,6 @@
 //#![warn(clippy::unwrap_used)]
 use crate::database::{ErrorKind, Result, settings, Storage, StorageError};
 use crate::micropub::{MicropubUpdate, MicropubPropertyDeletion};
-use async_trait::async_trait;
 use futures::{stream, StreamExt, TryStreamExt};
 use kittybox_util::MentionType;
 use serde_json::json;
@@ -245,7 +244,6 @@ async fn hydrate_author<S: Storage>(
     }
 }
 
-#[async_trait]
 impl Storage for FileStorage {
     async fn new(url: &'_ url::Url) -> Result<Self> {
         // TODO: sanity check
@@ -630,7 +628,7 @@ impl Storage for FileStorage {
     }
 
     #[tracing::instrument(skip(self))]
-    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> {
         debug!("User for getting settings: {}", user);
         let mut path = relative_path::RelativePathBuf::new();
         path.push(user.authority());
@@ -651,7 +649,7 @@ impl Storage for FileStorage {
     }
 
     #[tracing::instrument(skip(self))]
-    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<()> {
         let mut path = relative_path::RelativePathBuf::new();
         path.push(user.authority());
         path.push("settings");