@@ -1552,7 +1552,7 @@ impl Url {
1552
1552
if let Some ( input) = fragment {
1553
1553
self . fragment_start = Some ( to_u32 ( self . serialization . len ( ) ) . unwrap ( ) ) ;
1554
1554
self . serialization . push ( '#' ) ;
1555
- self . mutate ( |parser| parser. parse_fragment ( parser:: Input :: no_trim ( input) ) )
1555
+ self . mutate ( |parser| parser. parse_fragment ( parser:: Input :: new_no_trim ( input) ) )
1556
1556
} else {
1557
1557
self . fragment_start = None ;
1558
1558
self . strip_trailing_spaces_from_opaque_path ( ) ;
@@ -1615,7 +1615,7 @@ impl Url {
1615
1615
parser. parse_query (
1616
1616
scheme_type,
1617
1617
scheme_end,
1618
- parser:: Input :: trim_tab_and_newlines ( input, vfn) ,
1618
+ parser:: Input :: new_trim_tab_and_newlines ( input, vfn) ,
1619
1619
)
1620
1620
} ) ;
1621
1621
} else {
@@ -1736,10 +1736,14 @@ impl Url {
1736
1736
parser. serialization . push_str ( "%2F" ) ;
1737
1737
path = & path[ 1 ..] ;
1738
1738
}
1739
- parser. parse_cannot_be_a_base_path ( parser:: Input :: new ( path) ) ;
1739
+ parser. parse_cannot_be_a_base_path ( parser:: Input :: new_no_trim ( path) ) ;
1740
1740
} else {
1741
1741
let mut has_host = true ; // FIXME
1742
- parser. parse_path_start ( scheme_type, & mut has_host, parser:: Input :: new ( path) ) ;
1742
+ parser. parse_path_start (
1743
+ scheme_type,
1744
+ & mut has_host,
1745
+ parser:: Input :: new_no_trim ( path) ,
1746
+ ) ;
1743
1747
}
1744
1748
} ) ;
1745
1749
self . restore_after_path ( old_after_path_pos, & after_path) ;
@@ -2435,7 +2439,7 @@ impl Url {
2435
2439
#[ allow( clippy:: result_unit_err, clippy:: suspicious_operation_groupings) ]
2436
2440
pub fn set_scheme ( & mut self , scheme : & str ) -> Result < ( ) , ( ) > {
2437
2441
let mut parser = Parser :: for_setter ( String :: new ( ) ) ;
2438
- let remaining = parser. parse_scheme ( parser:: Input :: new ( scheme) ) ?;
2442
+ let remaining = parser. parse_scheme ( parser:: Input :: new_no_trim ( scheme) ) ?;
2439
2443
let new_scheme_type = SchemeType :: from ( & parser. serialization ) ;
2440
2444
let old_scheme_type = SchemeType :: from ( self . scheme ( ) ) ;
2441
2445
// If url’s scheme is a special scheme and buffer is not a special scheme, then return.
0 commit comments