From 4bbff06b31ef68930ba17a00ff5e11dfb327963a Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 8 Feb 2021 21:51:35 +0100 Subject: [PATCH] Use assert!()'s built-in formatting mechanics --- idna/tests/punycode.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/idna/tests/punycode.rs b/idna/tests/punycode.rs index 357a6211b..c0123c639 100644 --- a/idna/tests/punycode.rs +++ b/idna/tests/punycode.rs @@ -19,10 +19,10 @@ fn one_test(decoded: &str, encoded: &str) { let result = result.into_iter().collect::(); assert!( result == decoded, - format!( - "Incorrect decoding of \"{}\":\n \"{}\"\n!= \"{}\"\n", - encoded, result, decoded - ) + "Incorrect decoding of \"{}\":\n \"{}\"\n!= \"{}\"\n", + encoded, + result, + decoded ) } } @@ -31,10 +31,10 @@ fn one_test(decoded: &str, encoded: &str) { None => panic!("Encoding {} failed.", decoded), Some(result) => assert!( result == encoded, - format!( - "Incorrect encoding of \"{}\":\n \"{}\"\n!= \"{}\"\n", - decoded, result, encoded - ) + "Incorrect encoding of \"{}\":\n \"{}\"\n!= \"{}\"\n", + decoded, + result, + encoded ), } }