chore: Clippy fixes

This commit is contained in:
Ginger committed 2026-11-20 10:48:04 -05:00
1 parent 6f6e8c4eb5
commit a4ef1ecfa2
24 files changed
+32 -82

No files matched your search

+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 -2
View File
@@ -94,8 +94,7 @@ pub(crate) async fn room_initial_sync_route(
.first()
.map(at!(0))
.as_ref()
.map(ToString::to_string)
.unwrap_or_default();
.map_or_default(ToString::to_string);
let start = events.last().map(at!(0)).as_ref().map(ToString::to_string);
let chunk = events
+1 -2
View File
@@ -787,8 +787,7 @@ async fn build_room_summary(
Ok(Some(assign!(RoomSummary::new(), {
heroes: heroes
.map(|heroes| heroes.into_iter().collect())
.unwrap_or_default(),
.map_or_default(|heroes| heroes.into_iter().collect()),
joined_member_count: Some(ruma_from_u64(joined_member_count)),
invited_member_count: Some(ruma_from_u64(invited_member_count)),
})))
+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;