Răsfoiți Sursa

fix failed ci

lishuo 4 ani în urmă
părinte
comite
1f46217a6c
2 a modificat fișierele cu 10 adăugiri și 6 ștergeri
  1. 1 1
      data-url/src/mime.rs
  2. 9 5
      url/tests/data.rs

+ 1 - 1
data-url/src/mime.rs

@@ -69,7 +69,7 @@ fn parse_parameters(s: &str, parameters: &mut Vec<(String, String)>) {
     while let Some(piece) = semicolon_separated.next() {
         let piece = piece.trim_start_matches(ascii_whitespace);
         let (name, value) = split2(piece, '=');
-        if name.is_empty() || !only_http_token_code_points(name) || contains(&parameters, name) {
+        if name.is_empty() || !only_http_token_code_points(name) || contains(parameters, name) {
             continue;
         }
         if let Some(value) = value {

+ 9 - 5
url/tests/data.rs

@@ -45,8 +45,10 @@ fn urltestdata() {
         let failure = entry.take_key("failure").is_some();
 
         #[cfg(not(feature = "idna"))]
-        if idna_skip_inputs.contains(&input.as_str()) {
-            continue;
+        {
+            if idna_skip_inputs.contains(&input.as_str()) {
+                continue;
+            }
         }
 
         let base = match Url::parse(&base) {
@@ -126,9 +128,11 @@ fn setters_tests() {
         for mut test in tests.as_array_mut().unwrap().drain(..) {
             let comment = test.take_key("comment").map(|s| s.string());
             #[cfg(not(feature = "idna"))]
-            if let Some(comment) = comment.as_ref() {
-                if comment.starts_with("IDNA Nontransitional_Processing") {
-                    continue;
+            {
+                if let Some(comment) = comment.as_ref() {
+                    if comment.starts_with("IDNA Nontransitional_Processing") {
+                        continue;
+                    }
                 }
             }
             let href = test.take_string("href");