Fix broken serde tests, remove unused import
@@ -41,6 +41,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: test
+ args: --all-features
WASM:
runs-on: ubuntu-latest
@@ -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;
@@ -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