@@ -2058,12 +2058,12 @@ impl Url {
2058
2058
let new_scheme_type = SchemeType :: from ( & parser. serialization ) ;
2059
2059
let old_scheme_type = SchemeType :: from ( self . scheme ( ) ) ;
2060
2060
// If url’s scheme is a special scheme and buffer is not a special scheme, then return.
2061
- if new_scheme_type. is_special ( ) && !old_scheme_type. is_special ( ) ||
2061
+ if ( new_scheme_type. is_special ( ) && !old_scheme_type. is_special ( ) ) ||
2062
2062
// If url’s scheme is not a special scheme and buffer is a special scheme, then return.
2063
- !new_scheme_type. is_special ( ) && old_scheme_type. is_special ( ) ||
2063
+ ( !new_scheme_type. is_special ( ) && old_scheme_type. is_special ( ) ) ||
2064
2064
// If url includes credentials or has a non-null port, and buffer is "file", then return.
2065
2065
// If url’s scheme is "file" and its host is an empty host or null, then return.
2066
- new_scheme_type. is_file ( ) && self . has_authority ( )
2066
+ ( new_scheme_type. is_file ( ) && self . has_authority ( ) )
2067
2067
{
2068
2068
return Err ( ( ) ) ;
2069
2069
}
@@ -2095,8 +2095,8 @@ impl Url {
2095
2095
2096
2096
// Update the port so it can be removed
2097
2097
// If it is the scheme's default
2098
- // We don't mind it silently failing
2099
- // If there was no port in the first place
2098
+ // we don't mind it silently failing
2099
+ // if there was no port in the first place
2100
2100
let previous_port = self . port ( ) ;
2101
2101
let _ = self . set_port ( previous_port) ;
2102
2102
@@ -2575,7 +2575,7 @@ fn file_url_segments_to_pathbuf(
2575
2575
}
2576
2576
// A windows drive letter must end with a slash.
2577
2577
if bytes. len ( ) > 2 {
2578
- if matches ! ( bytes[ bytes. len( ) -2 ] , b'a' ..=b'z' | b'A' ..=b'Z' )
2578
+ if matches ! ( bytes[ bytes. len( ) - 2 ] , b'a' ..=b'z' | b'A' ..=b'Z' )
2579
2579
&& matches ! ( bytes[ bytes. len( ) - 1 ] , b':' | b'|' )
2580
2580
{
2581
2581
bytes. push ( b'/' ) ;
0 commit comments