Kaynağa Gözat

Merge pull request #781

Fix lint warnings.
Add env CARGO_NET_GIT_FETCH_WITH_CLI=true to avoid CI failure for rust 1.45.0 build.
Valentin Gosu 4 yıl önce
ebeveyn
işleme
a72f83d002
3 değiştirilmiş dosya ile 7 ekleme ve 3 silme
  1. 3 0
      .github/workflows/main.yml
  2. 3 2
      idna/tests/uts46.rs
  3. 1 1
      url/tests/data.rs

+ 3 - 0
.github/workflows/main.yml

@@ -5,6 +5,9 @@ on:
     branches: ["master"]
   pull_request:
 
+env:
+  CARGO_NET_GIT_FETCH_WITH_CLI: true
+
 jobs:
   Test:
     strategy:

+ 3 - 2
idna/tests/uts46.rs

@@ -8,6 +8,7 @@
 
 use crate::test::TestFn;
 use std::char;
+use std::fmt::Write;
 
 use idna::Errors;
 
@@ -160,8 +161,8 @@ fn unescape(input: &str) -> String {
                             match char::from_u32(((c1 * 16 + c2) * 16 + c3) * 16 + c4) {
                                 Some(c) => output.push(c),
                                 None => {
-                                    output
-                                        .push_str(&format!("\\u{:X}{:X}{:X}{:X}", c1, c2, c3, c4));
+                                    write!(&mut output, "\\u{:X}{:X}{:X}{:X}", c1, c2, c3, c4)
+                                        .expect("Could not write to output");
                                 }
                             };
                         }

+ 1 - 1
url/tests/data.rs

@@ -149,7 +149,7 @@ fn setters_tests() {
             let mut url = Url::parse(&href).unwrap();
             let comment_ref = comment.as_deref();
             passed &= check_invariants(&url, &name, comment_ref);
-            let _ = set(&mut url, attr, &new_value);
+            set(&mut url, attr, &new_value);
 
             for attr in ATTRIBS {
                 if let Some(value) = expected.take_key(attr) {