chore: Clippy fixes

This commit is contained in:
Ginger authored and Jacob Taylor committed 2026-11-20 10:37:06 -08:00
1 parent db68679a23
commit 24d515a9a1
17 files changed
+17 -35

No files matched your search

+1
View File
@@ -2,6 +2,7 @@
#![allow(clippy::wildcard_imports)]
#![allow(clippy::enum_glob_use)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::large_unopt_stack_frames, reason = "very large Subcommand macro expansions")]
conduwuit_macros::introspect_crate! {}
+1 -2
View File
@@ -15,8 +15,7 @@ use ruma::{
OneTimeKeyAlgorithm, OwnedDeviceId, OwnedUserId, UserId,
api::{
client::keys::{
claim_keys, get_key_changes, get_keys, upload_keys,
upload_signatures::{self},
claim_keys, get_key_changes, get_keys, upload_keys, upload_signatures,
upload_signing_keys,
},
federation,
+1 -4
View File
@@ -16,10 +16,7 @@ use futures::{FutureExt, StreamExt};
use ruma::{
CanonicalJsonObject, CanonicalJsonValue, OwnedEventId, OwnedRoomId, OwnedServerName,
OwnedUserId, RoomId, UserId,
api::{
client::knock::knock_room,
federation::{self},
},
api::{client::knock::knock_room, federation},
canonical_json::to_canonical_value,
events::{
StateEventType,
+1 -4
View File
@@ -10,10 +10,7 @@ use conduwuit::{
use futures::{FutureExt, StreamExt, pin_mut};
use ruma::{
CanonicalJsonObject, CanonicalJsonValue, OwnedServerName, RoomId, UserId,
api::{
client::membership::leave_room,
federation::{self},
},
api::{client::membership::leave_room, federation},
events::{
StateEventType,
room::member::{MembershipState, RoomMemberEventContent},
+1 -1
View File
@@ -9,7 +9,7 @@ use conduwuit::{
use futures::{FutureExt, StreamExt, future::join};
use ruma::{
api::client::membership::{
get_member_events::{self},
get_member_events,
joined_members::{self, v3::RoomMember},
},
events::{
+1 -1
View File
@@ -77,7 +77,7 @@ struct FullCreationContent {
/// - Send events listed in initial state
/// - Send events implied by `name` and `topic`
/// - Send invite events
#[allow(clippy::large_stack_frames)]
#[allow(clippy::large_unopt_stack_frames)]
#[allow(clippy::cognitive_complexity)]
pub(crate) async fn create_room_route(
State(services): State<crate::State>,
+1 -3
View File
@@ -5,9 +5,7 @@ use conduwuit::{
};
use futures::{FutureExt, StreamExt, pin_mut};
use ruma::{
api::client::user_directory::search_users::{self},
assign,
events::room::join_rules::JoinRule,
api::client::user_directory::search_users, assign, events::room::join_rules::JoinRule,
};
use crate::Ruma;
+1 -1
View File
@@ -69,7 +69,7 @@ pub(crate) async fn create_join_event_template_route(
.get_member(&body.room_id, &body.user_id)
.await
.ok()
.map_or_else(|| MembershipState::Leave, |content| content.membership);
.map_or(MembershipState::Leave, |content| content.membership);
let join_authorized_via_users_server: Option<OwnedUserId> = {
if matches!(
+1 -1
View File
@@ -22,7 +22,7 @@ use hyper_util::{
use tokio::{
fs,
net::{UnixListener, UnixStream, unix::SocketAddr},
sync::broadcast::{self},
sync::broadcast,
task::JoinSet,
time::{Duration, sleep},
};
+1 -1
View File
@@ -379,7 +379,7 @@ fn get_dns_resolver(server: &Arc<Server>) -> Result<Arc<TokioResolver>> {
info!(?nameservers, "Resolved nameservers for DNS client");
for sys_conf in nameservers {
let mut ns = sys_conf.clone();
let mut ns = sys_conf;
if config.query_over_tcp_only {
ns.connections = vec![ConnectionConfig::tcp()];
+1 -1
View File
@@ -1,7 +1,7 @@
use std::{
collections::HashSet,
ffi::{OsStr, OsString},
fs::{self},
fs,
path::PathBuf,
sync::Arc,
time::Instant,
+1
View File
@@ -1,4 +1,5 @@
#![type_length_limit = "8192"]
#![recursion_limit = "256"]
#![allow(refining_impl_trait)]
extern crate conduwuit_core as conduwuit;
+1 -1
View File
@@ -153,7 +153,7 @@ impl Service {
.get_member(room_id, sender_user)
.await
.ok()
.map_or_else(|| MembershipState::Leave, |content| content.membership)
.map_or(MembershipState::Leave, |content| content.membership)
} else {
MembershipState::Leave
};
+1 -4
View File
@@ -8,10 +8,7 @@ use conduwuit::{
utils::{self, IterStream, ReadyExt},
};
use database::{Deserialized, Get, Map, Qry};
use futures::{
Stream, StreamExt,
stream::{self},
};
use futures::{Stream, StreamExt, stream};
use ruma::{EventId, OwnedEventId, RoomId, events::StateEventType};
use serde::Deserialize;
+1 -1
View File
@@ -745,7 +745,7 @@ impl Service {
.get_member(room_id, querying_user)
.await
.ok()
.map_or_else(|| MembershipState::Leave, |content| content.membership);
.map_or(MembershipState::Leave, |content| content.membership);
if matches!(membership, MembershipState::Join | MembershipState::Invite) {
return true;
+1 -6
View File
@@ -1,10 +1,5 @@
use conduwuit::config::experiments::ToggledExperiment;
use conduwuit_core::{
Err, Result, err,
matrix::event::Event,
utils::{self},
warn,
};
use conduwuit_core::{Err, Result, err, matrix::event::Event, utils, warn};
use ruma::{EventId, events::room::encrypted::Relation, signatures::content_hash};
use super::{ExtractBody, ExtractRelatesTo};
+1 -4
View File
@@ -9,10 +9,7 @@ pub(super) mod remote;
use std::{mem, sync::Arc};
pub use account::{AccessTokenStatus, AccountStatus};
use conduwuit::{
Err, Error, Result, err,
utils::{self},
};
use conduwuit::{Err, Error, Result, err, utils};
use database::Map;
pub use device::DeviceToken;
pub use profile::ProfileFieldChange;