@@ -2058,12 +2058,12 @@ impl Url {
20582058 let new_scheme_type = SchemeType :: from ( & parser. serialization ) ;
20592059 let old_scheme_type = SchemeType :: from ( self . scheme ( ) ) ;
20602060 // 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 ( ) ) ||
20622062 // 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 ( ) ) ||
20642064 // If url includes credentials or has a non-null port, and buffer is "file", then return.
20652065 // 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 ( ) )
20672067 {
20682068 return Err ( ( ) ) ;
20692069 }
@@ -2095,8 +2095,8 @@ impl Url {
20952095
20962096 // Update the port so it can be removed
20972097 // 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
21002100 let previous_port = self . port ( ) ;
21012101 let _ = self . set_port ( previous_port) ;
21022102
@@ -2575,7 +2575,7 @@ fn file_url_segments_to_pathbuf(
25752575 }
25762576 // A windows drive letter must end with a slash.
25772577 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' )
25792579 && matches ! ( bytes[ bytes. len( ) - 1 ] , b':' | b'|' )
25802580 {
25812581 bytes. push ( b'/' ) ;
0 commit comments