Skip to content

Commit 9d8a8c5

Browse files
committed
chore: fix CI failures from clippy/MSRV
1 parent bbfb2c0 commit 9d8a8c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

url/tests/data.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
//! Data-driven tests
1010
11+
use std::ops::Deref;
1112
use std::str::FromStr;
1213

1314
use serde_json::Value;
@@ -110,7 +111,7 @@ fn setters_tests() {
110111
let mut expected = test.take_key("expected").unwrap();
111112

112113
let mut url = Url::parse(&href).unwrap();
113-
let comment_ref = comment.as_deref();
114+
let comment_ref = comment.as_ref().map(|s| s.deref());
114115
passed &= check_invariants(&url, &name, comment_ref);
115116
let _ = set(&mut url, attr, &new_value);
116117

@@ -188,6 +189,7 @@ fn get<'a>(url: &'a Url, attr: &str) -> &'a str {
188189
}
189190
}
190191

192+
#[allow(clippy::unit_arg)]
191193
fn set<'a>(url: &'a mut Url, attr: &str, new: &str) {
192194
let _ = match attr {
193195
"protocol" => quirks::set_protocol(url, new),

0 commit comments

Comments
 (0)