diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/authority.rs | 11 | ||||
-rw-r--r-- | src/parse_host_port.rs | 6 | ||||
-rw-r--r-- | src/percent_encoded_character_decoder.rs | 3 | ||||
-rw-r--r-- | src/uri.rs | 36 | ||||
-rw-r--r-- | src/validate_ipv4_address.rs | 3 | ||||
-rw-r--r-- | src/validate_ipv6_address.rs | 3 |
6 files changed, 55 insertions, 7 deletions
diff --git a/src/authority.rs b/src/authority.rs index f219ec0..f7505f8 100644 --- a/src/authority.rs +++ b/src/authority.rs @@ -184,9 +184,10 @@ mod tests { use super::*; #[test] - // NOTE: This lint has to be disabled at the test level because - // it's triggered inside the `named_tuple!` macro expansion. + // NOTE: These lints are disabled because they're triggered inside the + // `named_tuple!` macro expansion. #[allow(clippy::ref_option_ref)] + #[allow(clippy::from_over_into)] fn userinfo() { named_tuple!( struct TestVector { @@ -221,6 +222,9 @@ mod tests { } #[test] + // NOTE: This lint is disabled because it's triggered inside the + // `named_tuple!` macro expansion. + #[allow(clippy::from_over_into)] fn userinfo_barely_legal() { named_tuple!( struct TestVector { @@ -258,6 +262,9 @@ mod tests { } #[test] + // NOTE: This lint is disabled because it's triggered inside the + // `named_tuple!` macro expansion. + #[allow(clippy::from_over_into)] fn host_barely_legal() { named_tuple!( struct TestVector { diff --git a/src/parse_host_port.rs b/src/parse_host_port.rs index 0f02d48..cd9cb93 100644 --- a/src/parse_host_port.rs +++ b/src/parse_host_port.rs @@ -99,7 +99,7 @@ impl State { }, Self::IpvFutureBody(state) => Self::next_ipv_future_body(state, c), Self::GarbageCheck(state) => Self::next_garbage_check(state, c), - Self::Port(state) => Self::next_port(state, c), + Self::Port(state) => Ok(Self::next_port(state, c)), } } @@ -206,10 +206,10 @@ impl State { fn next_port( state: Shared, c: char, - ) -> Result<Self, Error> { + ) -> Self { let mut state = state; state.port_string.push(c); - Ok(Self::Port(state)) + Self::Port(state) } } diff --git a/src/percent_encoded_character_decoder.rs b/src/percent_encoded_character_decoder.rs index 70a229e..4d5c855 100644 --- a/src/percent_encoded_character_decoder.rs +++ b/src/percent_encoded_character_decoder.rs @@ -56,6 +56,9 @@ mod tests { use super::*; #[test] + // NOTE: This lint is disabled because it's triggered inside the + // `named_tuple!` macro expansion. + #[allow(clippy::from_over_into)] fn good_sequences() { named_tuple!( struct TestVector { @@ -873,6 +873,9 @@ mod tests { } #[test] + // NOTE: This lint is disabled because it's triggered inside the + // `named_tuple!` macro expansion. + #[allow(clippy::from_over_into)] fn path_corner_cases() { named_tuple!( struct TestVector { @@ -901,6 +904,9 @@ mod tests { } #[test] + // NOTE: This lint is disabled because it's triggered inside the + // `named_tuple!` macro expansion. + #[allow(clippy::from_over_into)] fn relative_vs_non_relative_references() { named_tuple!( struct TestVector { @@ -926,6 +932,9 @@ mod tests { } #[test] + // NOTE: This lint is disabled because it's triggered inside the + // `named_tuple!` macro expansion. + #[allow(clippy::from_over_into)] fn relative_vs_non_relative_paths() { named_tuple!( struct TestVector { @@ -957,9 +966,10 @@ mod tests { } #[test] - // NOTE: This lint has to be disabled at the test level because - // it's triggered inside the `named_tuple!` macro expansion. + // NOTE: These lints are disabled because they're triggered inside the + // `named_tuple!` macro expansion. #[allow(clippy::ref_option_ref)] + #[allow(clippy::from_over_into)] fn query_and_fragment_elements() { named_tuple!( struct TestVector { @@ -1041,6 +1051,9 @@ mod tests { } #[test] + // NOTE: This lint is disabled because it's triggered inside the + // `named_tuple!` macro expansion. + #[allow(clippy::from_over_into)] fn scheme_barely_legal() { named_tuple!( struct TestVector { @@ -1130,6 +1143,9 @@ mod tests { } #[test] + // NOTE: This lint is disabled because it's triggered inside the + // `named_tuple!` macro expansion. + #[allow(clippy::from_over_into)] fn path_barely_legal() { named_tuple!( struct TestVector { @@ -1189,6 +1205,9 @@ mod tests { } #[test] + // NOTE: This lint is disabled because it's triggered inside the + // `named_tuple!` macro expansion. + #[allow(clippy::from_over_into)] fn query_barely_legal() { named_tuple!( struct TestVector { @@ -1248,6 +1267,9 @@ mod tests { } #[test] + // NOTE: This lint is disabled because it's triggered inside the + // `named_tuple!` macro expansion. + #[allow(clippy::from_over_into)] fn fragment_barely_legal() { named_tuple!( struct TestVector { @@ -1275,6 +1297,9 @@ mod tests { } #[test] + // NOTE: This lint is disabled because it's triggered inside the + // `named_tuple!` macro expansion. + #[allow(clippy::from_over_into)] fn paths_with_percent_encoded_characters() { named_tuple!( struct TestVector { @@ -1305,6 +1330,9 @@ mod tests { } #[test] + // NOTE: This lint is disabled because it's triggered inside the + // `named_tuple!` macro expansion. + #[allow(clippy::from_over_into)] fn normalize_path() { named_tuple!( struct TestVector { @@ -1384,6 +1412,9 @@ mod tests { } #[test] + // NOTE: This lint is disabled because it's triggered inside the + // `named_tuple!` macro expansion. + #[allow(clippy::from_over_into)] fn reference_resolution() { named_tuple!( struct TestVector { @@ -1464,6 +1495,7 @@ mod tests { // triggered inside the `named_tuple!` macro expansion. #[allow(clippy::too_many_arguments)] #[allow(clippy::ref_option_ref)] + #[allow(clippy::from_over_into)] fn generate_string() { named_tuple!( struct TestVector { diff --git a/src/validate_ipv4_address.rs b/src/validate_ipv4_address.rs index 3c0b739..fb93759 100644 --- a/src/validate_ipv4_address.rs +++ b/src/validate_ipv4_address.rs @@ -127,6 +127,9 @@ mod tests { } #[test] + // NOTE: This lint is disabled because it's triggered inside the + // `named_tuple!` macro expansion. + #[allow(clippy::from_over_into)] fn bad() { named_tuple!( struct TestVector { diff --git a/src/validate_ipv6_address.rs b/src/validate_ipv6_address.rs index 1f3961f..2291328 100644 --- a/src/validate_ipv6_address.rs +++ b/src/validate_ipv6_address.rs @@ -276,6 +276,9 @@ mod tests { } #[test] + // NOTE: This lint is disabled because it's triggered inside the + // `named_tuple!` macro expansion. + #[allow(clippy::from_over_into)] fn bad() { named_tuple!( struct TestVector { |