@@ -1434,7 +1434,7 @@ impl Url {
1434
1434
/// Return an object with methods to manipulate this URL’s path segments.
1435
1435
///
1436
1436
/// Return `Err(())` if this URL is cannot-be-a-base.
1437
- #[ allow( clippy:: result_map_unit_fn ) ]
1437
+ #[ allow( clippy:: result_unit_err ) ]
1438
1438
pub fn path_segments_mut ( & mut self ) -> Result < PathSegmentsMut < ' _ > , ( ) > {
1439
1439
if self . cannot_be_a_base ( ) {
1440
1440
Err ( ( ) )
@@ -1518,7 +1518,7 @@ impl Url {
1518
1518
/// # }
1519
1519
/// # run().unwrap();
1520
1520
/// ```
1521
- #[ allow( clippy:: result_map_unit_fn ) ]
1521
+ #[ allow( clippy:: result_unit_err ) ]
1522
1522
pub fn set_port ( & mut self , mut port : Option < u16 > ) -> Result < ( ) , ( ) > {
1523
1523
// has_host implies !cannot_be_a_base
1524
1524
if !self . has_host ( ) || self . host ( ) == Some ( Host :: Domain ( "" ) ) || self . scheme ( ) == "file" {
@@ -1789,7 +1789,7 @@ impl Url {
1789
1789
/// # run().unwrap();
1790
1790
/// ```
1791
1791
///
1792
- #[ allow( clippy:: result_map_unit_fn ) ]
1792
+ #[ allow( clippy:: result_unit_err ) ]
1793
1793
pub fn set_ip_host ( & mut self , address : IpAddr ) -> Result < ( ) , ( ) > {
1794
1794
if self . cannot_be_a_base ( ) {
1795
1795
return Err ( ( ) ) ;
@@ -1829,7 +1829,7 @@ impl Url {
1829
1829
/// # }
1830
1830
/// # run().unwrap();
1831
1831
/// ```
1832
- #[ allow( clippy:: result_map_unit_fn ) ]
1832
+ #[ allow( clippy:: result_unit_err ) ]
1833
1833
pub fn set_password ( & mut self , password : Option < & str > ) -> Result < ( ) , ( ) > {
1834
1834
// has_host implies !cannot_be_a_base
1835
1835
if !self . has_host ( ) || self . host ( ) == Some ( Host :: Domain ( "" ) ) || self . scheme ( ) == "file" {
@@ -1922,7 +1922,7 @@ impl Url {
1922
1922
/// # }
1923
1923
/// # run().unwrap();
1924
1924
/// ```
1925
- #[ allow( clippy:: result_map_unit_fn ) ]
1925
+ #[ allow( clippy:: result_unit_err ) ]
1926
1926
pub fn set_username ( & mut self , username : & str ) -> Result < ( ) , ( ) > {
1927
1927
// has_host implies !cannot_be_a_base
1928
1928
if !self . has_host ( ) || self . host ( ) == Some ( Host :: Domain ( "" ) ) || self . scheme ( ) == "file" {
@@ -2084,7 +2084,7 @@ impl Url {
2084
2084
/// # }
2085
2085
/// # run().unwrap();
2086
2086
/// ```
2087
- #[ allow( clippy:: result_map_unit_fn , clippy:: suspicious_operation_groupings) ]
2087
+ #[ allow( clippy:: result_unit_err , clippy:: suspicious_operation_groupings) ]
2088
2088
pub fn set_scheme ( & mut self , scheme : & str ) -> Result < ( ) , ( ) > {
2089
2089
let mut parser = Parser :: for_setter ( String :: new ( ) ) ;
2090
2090
let remaining = parser. parse_scheme ( parser:: Input :: new ( scheme) ) ?;
@@ -2164,7 +2164,7 @@ impl Url {
2164
2164
/// # }
2165
2165
/// ```
2166
2166
#[ cfg( any( unix, windows, target_os = "redox" ) ) ]
2167
- #[ allow( clippy:: result_map_unit_fn ) ]
2167
+ #[ allow( clippy:: result_unit_err ) ]
2168
2168
pub fn from_file_path < P : AsRef < Path > > ( path : P ) -> Result < Url , ( ) > {
2169
2169
let mut serialization = "file://" . to_owned ( ) ;
2170
2170
let host_start = serialization. len ( ) as u32 ;
@@ -2201,7 +2201,7 @@ impl Url {
2201
2201
/// Note that `std::path` does not consider trailing slashes significant
2202
2202
/// and usually does not include them (e.g. in `Path::parent()`).
2203
2203
#[ cfg( any( unix, windows, target_os = "redox" ) ) ]
2204
- #[ allow( clippy:: result_map_unit_fn ) ]
2204
+ #[ allow( clippy:: result_unit_err ) ]
2205
2205
pub fn from_directory_path < P : AsRef < Path > > ( path : P ) -> Result < Url , ( ) > {
2206
2206
let mut url = Url :: from_file_path ( path) ?;
2207
2207
if !url. serialization . ends_with ( '/' ) {
@@ -2318,7 +2318,7 @@ impl Url {
2318
2318
/// for a Windows path, is not UTF-8.)
2319
2319
#[ inline]
2320
2320
#[ cfg( any( unix, windows, target_os = "redox" ) ) ]
2321
- #[ allow( clippy:: result_map_unit_fn ) ]
2321
+ #[ allow( clippy:: result_unit_err ) ]
2322
2322
pub fn to_file_path ( & self ) -> Result < PathBuf , ( ) > {
2323
2323
if let Some ( segments) = self . path_segments ( ) {
2324
2324
let host = match self . host ( ) {
0 commit comments