File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -178,8 +178,7 @@ pub fn default_port(scheme: &str) -> Option<u16> {
178
178
}
179
179
}
180
180
181
- #[ derive( Clone ) ]
182
- #[ derive( Debug ) ]
181
+ #[ derive( Clone , Debug ) ]
183
182
pub struct Input < ' i > {
184
183
chars : str:: Chars < ' i > ,
185
184
}
@@ -1203,7 +1202,11 @@ impl<'a> Parser<'a> {
1203
1202
}
1204
1203
_ => {
1205
1204
self . check_url_code_point ( c, & input) ;
1206
- if scheme_type. is_file ( ) && is_normalized_windows_drive_letter ( & self . serialization [ path_start+1 ..] ) {
1205
+ if scheme_type. is_file ( )
1206
+ && is_normalized_windows_drive_letter (
1207
+ & self . serialization [ path_start + 1 ..] ,
1208
+ )
1209
+ {
1207
1210
self . serialization . push ( '/' ) ;
1208
1211
segment_start += 1 ;
1209
1212
}
@@ -1254,7 +1257,10 @@ impl<'a> Parser<'a> {
1254
1257
}
1255
1258
_ => {
1256
1259
// If url’s scheme is "file", url’s path is empty, and buffer is a Windows drive letter, then
1257
- if scheme_type. is_file ( ) && segment_start == path_start + 1 && is_windows_drive_letter ( segment_before_slash) {
1260
+ if scheme_type. is_file ( )
1261
+ && segment_start == path_start + 1
1262
+ && is_windows_drive_letter ( segment_before_slash)
1263
+ {
1258
1264
// Replace the second code point in buffer with U+003A (:).
1259
1265
if let Some ( c) = segment_before_slash. chars ( ) . next ( ) {
1260
1266
self . serialization . truncate ( segment_start) ;
You can’t perform that action at this time.
0 commit comments