From 56801780b659be609bbcb9ce3701ed2676130304 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Fri, 29 Oct 2021 23:11:24 +0200 Subject: [PATCH] Fix clippy lints --- crates/ruma-state-res/benches/state_res_bench.rs | 2 +- crates/ruma-state-res/src/test_utils.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ruma-state-res/benches/state_res_bench.rs b/crates/ruma-state-res/benches/state_res_bench.rs index b77c2f65..21fb2149 100644 --- a/crates/ruma-state-res/benches/state_res_bench.rs +++ b/crates/ruma-state-res/benches/state_res_bench.rs @@ -169,7 +169,7 @@ impl TestStore { self.0 .get(event_id) .map(Arc::clone) - .ok_or_else(|| Error::NotFound(format!("{} not found", event_id.to_string()))) + .ok_or_else(|| Error::NotFound(format!("{} not found", event_id))) } /// Returns the events that correspond to the `event_ids` sorted in the same order. diff --git a/crates/ruma-state-res/src/test_utils.rs b/crates/ruma-state-res/src/test_utils.rs index 5acab6bd..1c2a5f22 100644 --- a/crates/ruma-state-res/src/test_utils.rs +++ b/crates/ruma-state-res/src/test_utils.rs @@ -171,7 +171,7 @@ pub fn do_check( let ev = event_map.get(&node).unwrap_or_else(|| { panic!( "{} not found in {:?}", - node.to_string(), + node, event_map.keys().map(ToString::to_string).collect::>() ) }); @@ -209,7 +209,7 @@ impl TestStore { self.0 .get(event_id) .map(Arc::clone) - .ok_or_else(|| Error::NotFound(format!("{} not found", event_id.to_string()))) + .ok_or_else(|| Error::NotFound(format!("{} not found", event_id))) } /// Returns a Vec of the related auth events to the given `event`.