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`.