]> git.proxmox.com Git - rustc.git/blobdiff - vendor/idna/tests/punycode.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / vendor / idna / tests / punycode.rs
index 1851a32cfcb80726483dfc93b6bfcb4484b89294..c0123c639045cee7a05582b3ceefde2a52434886 100644 (file)
@@ -6,11 +6,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use crate::test::TestFn;
 use idna::punycode::{decode, encode_str};
-use serde_json::Value;
 use serde_json::map::Map;
+use serde_json::Value;
 use std::str::FromStr;
-use test::TestFn;
 
 fn one_test(decoded: &str, encoded: &str) {
     match decode(encoded) {
@@ -19,10 +19,10 @@ fn one_test(decoded: &str, encoded: &str) {
             let result = result.into_iter().collect::<String>();
             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
         ),
     }
 }