Simon Sapin 7 năm trước cách đây
mục cha
commit
bb84560d48
3 tập tin đã thay đổi với 4 bổ sung5 xóa
  1. 1 1
      idna/tests/punycode.rs
  2. 1 1
      idna/tests/tests.rs
  3. 2 3
      src/lib.rs

+ 1 - 1
idna/tests/punycode.rs

@@ -7,8 +7,8 @@
 // except according to those terms.
 
 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;
 

+ 1 - 1
idna/tests/tests.rs

@@ -1,6 +1,6 @@
 extern crate idna;
-extern crate serde_json;
 extern crate rustc_test as test;
+extern crate serde_json;
 
 mod punycode;
 mod uts46;

+ 2 - 3
src/lib.rs

@@ -2296,9 +2296,8 @@ impl<'de> serde::Deserialize<'de> for Url {
             where
                 E: Error,
             {
-                Url::parse(s).map_err(|err| {
-                    Error::invalid_value(Unexpected::Str(s), &err.description())
-                })
+                Url::parse(s)
+                    .map_err(|err| Error::invalid_value(Unexpected::Str(s), &err.description()))
             }
         }