File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -500,11 +500,11 @@ impl Url {
500
500
assert_eq ! ( self . path_start, self . scheme_end + 1 ) ;
501
501
}
502
502
if let Some ( start) = self . query_start {
503
- assert ! ( start > self . path_start) ;
503
+ assert ! ( start >= self . path_start) ;
504
504
assert_eq ! ( self . byte_at( start) , b'?' ) ;
505
505
}
506
506
if let Some ( start) = self . fragment_start {
507
- assert ! ( start > self . path_start) ;
507
+ assert ! ( start >= self . path_start) ;
508
508
assert_eq ! ( self . byte_at( start) , b'#' ) ;
509
509
}
510
510
if let ( Some ( query_start) , Some ( fragment_start) ) = ( self . query_start , self . fragment_start ) {
Original file line number Diff line number Diff line change @@ -1022,7 +1022,7 @@ impl<'a> Parser<'a> {
1022
1022
& mut self ,
1023
1023
scheme_type : SchemeType ,
1024
1024
has_host : & mut bool ,
1025
- mut input : Input < ' i > ,
1025
+ input : Input < ' i > ,
1026
1026
) -> Input < ' i > {
1027
1027
let path_start = self . serialization . len ( ) ;
1028
1028
let ( maybe_c, remaining) = input. split_first ( ) ;
@@ -1049,10 +1049,7 @@ impl<'a> Parser<'a> {
1049
1049
return self . parse_fragment_2 ( remaining) ;
1050
1050
}
1051
1051
// Otherwise, if c is not the EOF code point:
1052
- if !remaining. is_empty ( ) {
1053
- return self . parse_path ( scheme_type, has_host, path_start, input) ;
1054
- }
1055
- input
1052
+ self . parse_path ( scheme_type, has_host, path_start, input)
1056
1053
}
1057
1054
1058
1055
pub fn parse_query_2 < ' i > (
You can’t perform that action at this time.
0 commit comments