diff --git a/Cargo.toml b/Cargo.toml index fa734c33..42474427 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -285,7 +285,7 @@ lossy_float_literal = "warn" mem_forget = "warn" # missing_assert_message = "warn" # mod_module_files = "warn" -multiple_inherent_impl = "warn" +# multiple_inherent_impl = "warn" mutex_atomic = "warn" # same_name_method = "warn" # semicolon_outside_block = "warn" diff --git a/src/database/key_value/rooms/state_cache.rs b/src/database/key_value/rooms/state_cache.rs index b23db30c..c71d481d 100644 --- a/src/database/key_value/rooms/state_cache.rs +++ b/src/database/key_value/rooms/state_cache.rs @@ -281,7 +281,7 @@ impl service::rooms::state_cache::Data for KeyValueDatabase { } #[tracing::instrument(skip(self))] - fn server_in_room<'a>(&'a self, server: &ServerName, room_id: &RoomId) -> Result { + fn server_in_room(&self, server: &ServerName, room_id: &RoomId) -> Result { let mut key = server.as_bytes().to_vec(); key.push(0xff); key.extend_from_slice(room_id.as_bytes()); diff --git a/src/database/mod.rs b/src/database/mod.rs index 1d88b041..e35a45b8 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -1066,6 +1066,7 @@ impl KeyValueDatabase { res } + #[allow(clippy::infinite_loop)] #[tracing::instrument] pub fn start_check_for_updates_task() { tokio::spawn(async move { diff --git a/src/service/rooms/state_cache/mod.rs b/src/service/rooms/state_cache/mod.rs index 6498b86e..6b792906 100644 --- a/src/service/rooms/state_cache/mod.rs +++ b/src/service/rooms/state_cache/mod.rs @@ -262,7 +262,7 @@ impl Service { } #[tracing::instrument(skip(self))] - pub fn server_in_room<'a>(&'a self, server: &ServerName, room_id: &RoomId) -> Result { + pub fn server_in_room(&self, server: &ServerName, room_id: &RoomId) -> Result { self.db.server_in_room(server, room_id) } diff --git a/src/utils/mod.rs b/src/utils/mod.rs index e737df17..59c522dd 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -138,9 +138,7 @@ pub(crate) fn deserialize_from_str< deserializer: D, ) -> Result { struct Visitor, E>(std::marker::PhantomData); - impl<'de, T: FromStr, Err: std::fmt::Display> serde::de::Visitor<'de> - for Visitor - { + impl, Err: std::fmt::Display> serde::de::Visitor<'_> for Visitor { type Value = T; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(formatter, "a parsable string") @@ -162,7 +160,7 @@ pub(crate) fn deserialize_from_str< /// string when passed to a format string. pub(crate) struct HtmlEscape<'a>(pub(crate) &'a str); -impl<'a> fmt::Display for HtmlEscape<'a> { +impl fmt::Display for HtmlEscape<'_> { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { // Because the internet is always right, turns out there's not that many // characters to escape: http://stackoverflow.com/questions/7381974