From c79e950ca22c7a957c11e510700664327b042115 Mon Sep 17 00:00:00 2001 From: Vika Date: Mon, 26 Aug 2024 14:08:07 +0300 Subject: Appease most clippy warnings The warnings only remain in places where I need them to remain, because I either need a reminder to implement something, or I need to refactor and simplify the code in question. --- src/database/mod.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/database/mod.rs') diff --git a/src/database/mod.rs b/src/database/mod.rs index 7b50196..3b13cb3 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -55,7 +55,9 @@ pub mod settings { /// implementations, as it wouldn't make sense to add new settings /// that aren't used by Kittybox itself. pub trait Setting<'de>: private::Sealed + std::fmt::Debug + Default + Clone + serde::Serialize + serde::de::DeserializeOwned + /*From +*/ Send + Sync { + /// The data that the setting carries. type Data: std::fmt::Debug + Send + Sync; + /// The string ID for the setting, usable as an identifier in the database. const ID: &'static str; /// Unwrap the setting type, returning owned data contained within. @@ -89,11 +91,6 @@ pub mod settings { Self(data) } } - impl SiteName { - fn from_str(data: &str) -> Self { - Self(data.to_owned()) - } - } /// Participation status in the IndieWeb Webring: https://πŸ•ΈπŸ’.ws/dashboard #[derive(Debug, Default, serde::Deserialize, serde::Serialize, Clone, Copy, PartialEq, Eq)] @@ -600,7 +597,7 @@ mod tests { .await .unwrap(); - for (i, post) in posts.iter().rev().enumerate() { + for post in posts.iter().rev() { backend .put_post(post, &"https://fireburn.ru/".parse().unwrap()) .await -- cgit 1.4.1