fix `cargo check` lints

merge-requests/594/head
Charles Hall 6 months ago
parent dc2f53e773
commit 92c5b6b86c
No known key found for this signature in database
GPG Key ID: 7B8E0645816E07CF

@ -360,7 +360,7 @@ pub(crate) async fn get_keys_helper<F: Fn(&UserId) -> bool>(
.bad_query_ratelimiter .bad_query_ratelimiter
.read() .read()
.unwrap() .unwrap()
.get(&*server) .get(server)
{ {
// Exponential backoff // Exponential backoff
let mut min_elapsed_duration = Duration::from_secs(30) * (*tries) * (*tries); let mut min_elapsed_duration = Duration::from_secs(30) * (*tries) * (*tries);
@ -393,7 +393,7 @@ pub(crate) async fn get_keys_helper<F: Fn(&UserId) -> bool>(
), ),
) )
.await .await
.map_err(|e| Error::BadServerResponse("Query took too long")), .map_err(|_e| Error::BadServerResponse("Query took too long")),
) )
}) })
.collect(); .collect();

@ -163,6 +163,8 @@ pub async fn login_route(body: Ruma<login::v3::Request>) -> Result<login::v3::Re
info!("{} logged in", user_id); info!("{} logged in", user_id);
// Homeservers are still required to send the `home_server` field
#[allow(deprecated)]
Ok(login::v3::Response { Ok(login::v3::Response {
user_id, user_id,
access_token: token, access_token: token,

@ -55,7 +55,7 @@ use std::{
time::{Duration, Instant, SystemTime}, time::{Duration, Instant, SystemTime},
}; };
use tracing::{debug, error, trace, warn}; use tracing::{debug, error, warn};
/// Wraps either an literal IP address plus port, or a hostname plus complement /// Wraps either an literal IP address plus port, or a hostname plus complement
/// (colon-plus-port if it was specified). /// (colon-plus-port if it was specified).

@ -10,7 +10,7 @@ impl service::rooms::threads::Data for KeyValueDatabase {
user_id: &'a UserId, user_id: &'a UserId,
room_id: &'a RoomId, room_id: &'a RoomId,
until: u64, until: u64,
include: &'a IncludeThreads, _include: &'a IncludeThreads,
) -> Result<Box<dyn Iterator<Item = Result<(u64, PduEvent)>> + 'a>> { ) -> Result<Box<dyn Iterator<Item = Result<(u64, PduEvent)>> + 'a>> {
let prefix = services() let prefix = services()
.rooms .rooms
@ -27,7 +27,7 @@ impl service::rooms::threads::Data for KeyValueDatabase {
self.threadid_userids self.threadid_userids
.iter_from(&current, true) .iter_from(&current, true)
.take_while(move |(k, _)| k.starts_with(&prefix)) .take_while(move |(k, _)| k.starts_with(&prefix))
.map(move |(pduid, users)| { .map(move |(pduid, _users)| {
let count = utils::u64_from_bytes(&pduid[(mem::size_of::<u64>())..]) let count = utils::u64_from_bytes(&pduid[(mem::size_of::<u64>())..])
.map_err(|_| Error::bad_database("Invalid pduid in threadid_userids."))?; .map_err(|_| Error::bad_database("Invalid pduid in threadid_userids."))?;
let mut pdu = services() let mut pdu = services()

Loading…
Cancel
Save