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 @@ -501,11 +501,11 @@ impl Url {
501
501
assert_eq ! ( self . path_start, self . scheme_end + 1 ) ;
502
502
}
503
503
if let Some ( start) = self . query_start {
504
- assert ! ( start > self . path_start) ;
504
+ assert ! ( start >= self . path_start) ;
505
505
assert_eq ! ( self . byte_at( start) , b'?' ) ;
506
506
}
507
507
if let Some ( start) = self . fragment_start {
508
- assert ! ( start > self . path_start) ;
508
+ assert ! ( start >= self . path_start) ;
509
509
assert_eq ! ( self . byte_at( start) , b'#' ) ;
510
510
}
511
511
if let ( Some ( query_start) , Some ( fragment_start) ) = ( self . query_start , self . fragment_start ) {
Original file line number Diff line number Diff line change @@ -1040,7 +1040,7 @@ impl<'a> Parser<'a> {
1040
1040
& mut self ,
1041
1041
scheme_type : SchemeType ,
1042
1042
has_host : & mut bool ,
1043
- mut input : Input < ' i > ,
1043
+ input : Input < ' i > ,
1044
1044
) -> Input < ' i > {
1045
1045
let path_start = self . serialization . len ( ) ;
1046
1046
let ( maybe_c, remaining) = input. split_first ( ) ;
@@ -1067,10 +1067,7 @@ impl<'a> Parser<'a> {
1067
1067
return self . parse_fragment_2 ( remaining) ;
1068
1068
}
1069
1069
// Otherwise, if c is not the EOF code point:
1070
- if !remaining. is_empty ( ) {
1071
- return self . parse_path ( scheme_type, has_host, path_start, input) ;
1072
- }
1073
- input
1070
+ self . parse_path ( scheme_type, has_host, path_start, input)
1074
1071
}
1075
1072
1076
1073
pub fn parse_query_2 < ' i > (
You can’t perform that action at this time.
0 commit comments