Skip to content

Commit

Permalink
url: simplify input cleanup before parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwuelker committed Jul 26, 2024
1 parent 1e74ff5 commit c8ffa2f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/url/src/url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,7 @@ impl URL {
// If input contains any leading or trailing C0 control or space, validation error.

// Remove any leading and trailing C0 control or space from input.
input = input
.trim_start_matches(util::is_c0_or_space)
.trim_end_matches(util::is_c0_or_space);
input = input.trim_matches(util::is_c0_or_space);
url
},
};
Expand Down

0 comments on commit c8ffa2f

Please sign in to comment.