resolve some pedantic lints, reduce some allocations
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
@@ -806,10 +806,7 @@ async fn join_room_by_id_helper(
|
||||
|
||||
let restriction_rooms = match join_rules_event_content {
|
||||
Some(RoomJoinRulesEventContent {
|
||||
join_rule: JoinRule::Restricted(restricted),
|
||||
})
|
||||
| Some(RoomJoinRulesEventContent {
|
||||
join_rule: JoinRule::KnockRestricted(restricted),
|
||||
join_rule: JoinRule::Restricted(restricted) | JoinRule::KnockRestricted(restricted),
|
||||
}) => restricted
|
||||
.allow
|
||||
.into_iter()
|
||||
|
||||
@@ -28,8 +28,8 @@ pub async fn get_relating_events_with_rel_type_and_event_type_route(
|
||||
sender_user,
|
||||
&body.room_id,
|
||||
&body.event_id,
|
||||
Some(body.event_type.clone()),
|
||||
Some(body.rel_type.clone()),
|
||||
&Some(body.event_type.clone()),
|
||||
&Some(body.rel_type.clone()),
|
||||
from,
|
||||
to,
|
||||
limit,
|
||||
@@ -66,8 +66,8 @@ pub async fn get_relating_events_with_rel_type_route(
|
||||
sender_user,
|
||||
&body.room_id,
|
||||
&body.event_id,
|
||||
None,
|
||||
Some(body.rel_type.clone()),
|
||||
&None,
|
||||
&Some(body.rel_type.clone()),
|
||||
from,
|
||||
to,
|
||||
limit,
|
||||
@@ -104,8 +104,8 @@ pub async fn get_relating_events_route(
|
||||
sender_user,
|
||||
&body.room_id,
|
||||
&body.event_id,
|
||||
None,
|
||||
None,
|
||||
&None,
|
||||
&None,
|
||||
from,
|
||||
to,
|
||||
limit,
|
||||
|
||||
Reference in New Issue
Block a user