Procházet zdrojové kódy

Merge pull request #657 from djc/test-fixes

Fix broken serde tests, remove unused import
Valentin Gosu před 5 roky
rodič
revize
947d66352e
3 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 1 0
      .github/workflows/main.yml
  2. 0 2
      url/src/lib.rs
  3. 1 1
      url/tests/data.rs

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

@@ -41,6 +41,7 @@ jobs:
       - uses: actions-rs/cargo@v1
         with:
           command: test
+          args: --all-features
 
   WASM:
     runs-on: ubuntu-latest

+ 0 - 2
url/src/lib.rs

@@ -131,8 +131,6 @@ use crate::parser::{to_u32, Context, Parser, SchemeType, PATH_SEGMENT, USERINFO}
 use percent_encoding::{percent_decode, percent_encode, utf8_percent_encode};
 use std::borrow::Borrow;
 use std::cmp;
-#[cfg(feature = "serde")]
-use std::error::Error;
 use std::fmt::{self, Write};
 use std::hash;
 use std::io;

+ 1 - 1
url/tests/data.rs

@@ -144,7 +144,7 @@ fn check_invariants(url: &Url, name: &str, comment: Option<&str>) -> bool {
     {
         let bytes = serde_json::to_vec(url).unwrap();
         let new_url: Url = serde_json::from_slice(&bytes).unwrap();
-        passed &= test_eq(url, &new_url, name, comment);
+        passed &= test_eq_eprint(url.to_string(), &new_url.to_string(), name, comment);
     }
 
     passed