@@ -1552,7 +1552,7 @@ impl Url {
15521552 if let Some ( input) = fragment {
15531553 self . fragment_start = Some ( to_u32 ( self . serialization . len ( ) ) . unwrap ( ) ) ;
15541554 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) ) )
15561556 } else {
15571557 self . fragment_start = None ;
15581558 self . strip_trailing_spaces_from_opaque_path ( ) ;
@@ -1615,7 +1615,7 @@ impl Url {
16151615 parser. parse_query (
16161616 scheme_type,
16171617 scheme_end,
1618- parser:: Input :: trim_tab_and_newlines ( input, vfn) ,
1618+ parser:: Input :: new_trim_tab_and_newlines ( input, vfn) ,
16191619 )
16201620 } ) ;
16211621 } else {
@@ -1736,10 +1736,14 @@ impl Url {
17361736 parser. serialization . push_str ( "%2F" ) ;
17371737 path = & path[ 1 ..] ;
17381738 }
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) ) ;
17401740 } else {
17411741 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+ ) ;
17431747 }
17441748 } ) ;
17451749 self . restore_after_path ( old_after_path_pos, & after_path) ;
@@ -2435,7 +2439,7 @@ impl Url {
24352439 #[ allow( clippy:: result_unit_err, clippy:: suspicious_operation_groupings) ]
24362440 pub fn set_scheme ( & mut self , scheme : & str ) -> Result < ( ) , ( ) > {
24372441 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) ) ?;
24392443 let new_scheme_type = SchemeType :: from ( & parser. serialization ) ;
24402444 let old_scheme_type = SchemeType :: from ( self . scheme ( ) ) ;
24412445 // If url’s scheme is a special scheme and buffer is not a special scheme, then return.
0 commit comments