Reformat imports and fix clippy warnings
This commit is contained in:
parent
db8a0c5d69
commit
0d69ebdc6c
7 changed files with 34 additions and 22 deletions
|
@ -15,13 +15,10 @@ use ruma::{
|
|||
},
|
||||
},
|
||||
events::{
|
||||
room::canonical_alias,
|
||||
room::guest_access,
|
||||
room::history_visibility,
|
||||
room::join_rules,
|
||||
room::member,
|
||||
room::name,
|
||||
room::{message, topic},
|
||||
room::{
|
||||
canonical_alias, guest_access, history_visibility, join_rules, member, message, name,
|
||||
topic,
|
||||
},
|
||||
EventType,
|
||||
},
|
||||
RoomAliasId, RoomId, RoomVersionId, UserId,
|
||||
|
|
|
@ -15,9 +15,7 @@ use ruma::{
|
|||
},
|
||||
federation,
|
||||
},
|
||||
directory::Filter,
|
||||
directory::RoomNetwork,
|
||||
directory::{IncomingFilter, IncomingRoomNetwork, PublicRoomsChunk},
|
||||
directory::{Filter, IncomingFilter, IncomingRoomNetwork, PublicRoomsChunk, RoomNetwork},
|
||||
events::{
|
||||
room::{avatar, canonical_alias, guest_access, history_visibility, name, topic},
|
||||
EventType,
|
||||
|
|
|
@ -17,15 +17,12 @@ use ruma::{
|
|||
},
|
||||
federation,
|
||||
},
|
||||
events::pdu::Pdu,
|
||||
events::{room::member, EventType},
|
||||
events::{pdu::Pdu, room::member, EventType},
|
||||
EventId, Raw, RoomId, RoomVersionId, ServerName, UserId,
|
||||
};
|
||||
use state_res::StateEvent;
|
||||
use std::{
|
||||
collections::BTreeMap,
|
||||
collections::HashMap,
|
||||
collections::HashSet,
|
||||
collections::{BTreeMap, HashMap, HashSet},
|
||||
convert::{TryFrom, TryInto},
|
||||
iter,
|
||||
sync::Arc,
|
||||
|
|
|
@ -9,9 +9,8 @@ use ruma::{
|
|||
},
|
||||
},
|
||||
events::{
|
||||
room::history_visibility::HistoryVisibility,
|
||||
room::history_visibility::HistoryVisibilityEventContent, AnyStateEventContent,
|
||||
EventContent, EventType,
|
||||
room::history_visibility::{HistoryVisibility, HistoryVisibilityEventContent},
|
||||
AnyStateEventContent, EventContent, EventType,
|
||||
},
|
||||
EventId, RoomId, UserId,
|
||||
};
|
||||
|
@ -103,6 +102,7 @@ pub async fn get_state_events_route(
|
|||
) -> ConduitResult<get_state_events::Response> {
|
||||
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
|
||||
|
||||
#[allow(clippy::blocks_in_if_conditions)]
|
||||
// Users not in the room should not be able to access the state unless history_visibility is
|
||||
// WorldReadable
|
||||
if !db.rooms.is_joined(sender_user, &body.room_id)?
|
||||
|
@ -148,6 +148,7 @@ pub async fn get_state_events_for_key_route(
|
|||
) -> ConduitResult<get_state_events_for_key::Response> {
|
||||
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
|
||||
|
||||
#[allow(clippy::blocks_in_if_conditions)]
|
||||
// Users not in the room should not be able to access the state unless history_visibility is
|
||||
// WorldReadable
|
||||
if !db.rooms.is_joined(sender_user, &body.room_id)?
|
||||
|
@ -198,6 +199,7 @@ pub async fn get_state_events_for_empty_key_route(
|
|||
) -> ConduitResult<get_state_events_for_empty_key::Response> {
|
||||
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
|
||||
|
||||
#[allow(clippy::blocks_in_if_conditions)]
|
||||
// Users not in the room should not be able to access the state unless history_visibility is
|
||||
// WorldReadable
|
||||
if !db.rooms.is_joined(sender_user, &body.room_id)?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue