diff --git a/src/api/client_server/unversioned.rs b/src/api/client_server/unversioned.rs index f1b35a20..e092eb05 100644 --- a/src/api/client_server/unversioned.rs +++ b/src/api/client_server/unversioned.rs @@ -1,4 +1,4 @@ -use std::{collections::BTreeMap, iter::FromIterator}; +use std::collections::BTreeMap; use axum::{response::IntoResponse, Json}; use ruma::api::client::{discovery::get_supported_versions, error::ErrorKind}; diff --git a/src/api/ruma_wrapper/axum.rs b/src/api/ruma_wrapper/axum.rs index fda13531..57348a73 100644 --- a/src/api/ruma_wrapper/axum.rs +++ b/src/api/ruma_wrapper/axum.rs @@ -1,4 +1,4 @@ -use std::{collections::BTreeMap, iter::FromIterator, str}; +use std::{collections::BTreeMap, str}; use axum::{ async_trait, diff --git a/src/database/abstraction.rs b/src/database/abstraction.rs index 5056de8f..44e24968 100644 --- a/src/database/abstraction.rs +++ b/src/database/abstraction.rs @@ -24,6 +24,8 @@ pub(crate) trait KeyValueDatabaseEngine: Send + Sync { fn memory_usage(&self) -> Result { Ok("Current database engine does not support memory usage reporting.".to_owned()) } + + #[allow(dead_code)] fn clear_caches(&self) {} } diff --git a/src/database/abstraction/rocksdb.rs b/src/database/abstraction/rocksdb.rs index 9dc565c7..dce30c91 100644 --- a/src/database/abstraction/rocksdb.rs +++ b/src/database/abstraction/rocksdb.rs @@ -164,6 +164,8 @@ impl KeyValueDatabaseEngine for Arc { )) } + // TODO: figure out if this is needed for rocksdb + #[allow(dead_code)] fn clear_caches(&self) {} } diff --git a/src/service/admin/mod.rs b/src/service/admin/mod.rs index 10184a35..4b9e4c54 100644 --- a/src/service/admin/mod.rs +++ b/src/service/admin/mod.rs @@ -1,6 +1,5 @@ use std::{ collections::BTreeMap, - convert::{TryFrom, TryInto}, sync::{Arc, RwLock}, time::Instant, }; diff --git a/src/service/rooms/event_handler/mod.rs b/src/service/rooms/event_handler/mod.rs index d34424be..0c83ee45 100644 --- a/src/service/rooms/event_handler/mod.rs +++ b/src/service/rooms/event_handler/mod.rs @@ -7,9 +7,9 @@ use ruma::{ RoomVersionId, }; use std::{ - collections::{hash_map, BTreeMap, HashMap, HashSet}, + collections::{hash_map, HashSet}, pin::Pin, - sync::{Arc, RwLock, RwLockWriteGuard}, + sync::RwLockWriteGuard, time::{Duration, Instant, SystemTime}, }; use tokio::sync::Semaphore; @@ -36,7 +36,7 @@ use ruma::{ use serde_json::value::RawValue as RawJsonValue; use tracing::{debug, error, info, trace, warn}; -use crate::{service::*, services, Error, PduEvent, Result}; +use crate::{service::*, services, Error, PduEvent}; use super::state_compressor::CompressedStateEvent;