diff --git a/frame/support/src/storage/bounded_vec.rs b/frame/support/src/storage/bounded_vec.rs index fbbb9d4d26653..88ab744129a58 100644 --- a/frame/support/src/storage/bounded_vec.rs +++ b/frame/support/src/storage/bounded_vec.rs @@ -998,7 +998,7 @@ pub mod test { serde_json::from_str(r#"[0,1,2,3,4,5]"#); match c { - Err(msg) => assert_eq!(format!("{}", msg), "out of bounds at line 1 column 11"), + Err(msg) => assert_eq!(msg.to_string(), "out of bounds at line 1 column 11"), _ => unreachable!("deserializer must raise error"), } }