mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-13 18:45:44 -04:00
base: Avoid clone in test
Detected by lint clippy::cloned_ref_to_slice_refs. Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
committed by
Damir Jelić
parent
ad2e3a3b8f
commit
dd02274883
@@ -1486,7 +1486,7 @@ mod tests {
|
||||
#[async_test]
|
||||
async fn test_when_only_one_event_we_cache_it() {
|
||||
let event1 = make_event("m.room.message", "$1");
|
||||
let events = &[event1.clone()];
|
||||
let events = std::slice::from_ref(&event1);
|
||||
let chosen = choose_event_to_cache(events).await;
|
||||
assert_eq!(ev_id(chosen), rawev_id(event1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user