Skip to content

Commit 6db4c40

Browse files
author
Daniel Lockyer
committed
Tidy up some small nits
1 parent 3c21bd9 commit 6db4c40

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/host.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ fn parse_ipv4number(mut input: &str) -> Result<u32, ()> {
314314
if input.starts_with('+') {
315315
return Err(())
316316
}
317-
match u32::from_str_radix(&input, r) {
317+
match u32::from_str_radix(input, r) {
318318
Ok(number) => Ok(number),
319319
Err(_) => Err(()),
320320
}

src/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ impl<'a> Parser<'a> {
854854
if !has_any_digit || opt_port == default_port() {
855855
opt_port = None;
856856
}
857-
return Ok((opt_port, input))
857+
Ok((opt_port, input))
858858
}
859859

860860
pub fn parse_path_start<'i>(&mut self, scheme_type: SchemeType, has_host: &mut bool,
@@ -1030,7 +1030,7 @@ impl<'a> Parser<'a> {
10301030
}
10311031
}
10321032
None => return Ok((None, None)),
1033-
_ => panic!("Programming error. parse_query_and_fragment() called without ? or # {:?}")
1033+
_ => panic!("Programming error. parse_query_and_fragment() called without ? or #")
10341034
}
10351035

10361036
let fragment_start = to_u32(self.serialization.len())?;

tests/data.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn check_invariants(url: &Url) {
2626
}
2727

2828

29-
fn run_parsing(input: String, base: String, expected: Result<ExpectedAttributes, ()>) {
29+
fn run_parsing(input: &String, base: &String, expected: Result<ExpectedAttributes, ()>) {
3030
let base = match Url::parse(&base) {
3131
Ok(base) => base,
3232
Err(message) => panic!("Error parsing base {:?}: {}", base, message)
@@ -135,7 +135,7 @@ fn collect_parsing<F: FnMut(String, test::TestFn)>(add_test: &mut F) {
135135
})
136136
};
137137
add_test(format!("{:?} @ base {:?}", input, base),
138-
test::TestFn::dyn_test_fn(move || run_parsing(input, base, expected)));
138+
test::TestFn::dyn_test_fn(move || run_parsing(&input, &base, expected)));
139139
}
140140
}
141141

0 commit comments

Comments
 (0)