diff --git a/ruma-common/src/push.rs b/ruma-common/src/push.rs index 19491535..12a47cbb 100644 --- a/ruma-common/src/push.rs +++ b/ruma-common/src/push.rs @@ -1200,8 +1200,7 @@ mod tests { }); set.add(three_conditions); - let test_set = set.clone(); - let mut actions = test_set.get_actions(&message, context_one_to_one); + let mut actions = set.get_actions(&message, context_one_to_one); assert_matches!(actions.next(), Some(Action::SetTweak(Tweak::Sound(sound))) if sound == "content"); let new_message = serde_json::from_str::>( @@ -1216,7 +1215,7 @@ mod tests { ) .unwrap(); - let mut actions = test_set.get_actions(&new_message, context_one_to_one); + let mut actions = set.get_actions(&new_message, context_one_to_one); assert_matches!(actions.next(), Some(Action::SetTweak(Tweak::Sound(sound))) if sound == "three"); } } diff --git a/ruma-common/src/push/condition.rs b/ruma-common/src/push/condition.rs index e5f88ad2..b10817f7 100644 --- a/ruma-common/src/push/condition.rs +++ b/ruma-common/src/push/condition.rs @@ -465,7 +465,7 @@ mod tests { let first_sender = user_id!("@worthy_whale:server.name"); let mut users_power_levels = BTreeMap::new(); - users_power_levels.insert(first_sender.clone(), 25.into()); + users_power_levels.insert(first_sender, 25.into()); let context = PushConditionRoomCtx { room_id: "!room:server.name".into(),