File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 88
99//! Data-driven tests
1010
11+ use std:: ops:: Deref ;
1112use std:: str:: FromStr ;
1213
1314use 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) ]
191193fn set < ' a > ( url : & ' a mut Url , attr : & str , new : & str ) {
192194 let _ = match attr {
193195 "protocol" => quirks:: set_protocol ( url, new) ,
You can’t perform that action at this time.
0 commit comments