Skip to content

Commit

Permalink
url: Remove redundant spec comments
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwuelker committed Jul 26, 2024
1 parent 00649d3 commit de80a35
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions crates/url/src/url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,6 @@ impl URL {
None => {
input = input.trim_matches(util::is_c0_or_space);

// If url is not given:
// Set url to a new URL.
let url = Self {
// This should be a reasonable approximation
serialization: ascii::String::with_capacity(input.len()),
Expand All @@ -286,23 +284,15 @@ impl URL {
port: None,
};

// If input contains any leading or trailing C0 control or space, validation error.

// Remove any leading and trailing C0 control or space from input.
url
},
};

// If input contains any ASCII tab or newline, validation error.

// Remove all ASCII tab or newline from input.
let filtered_input: String = input
.chars()
.filter(|c| !util::is_ascii_tab_or_newline(*c))
.collect();

// Set encoding to the result of getting an output encoding from encoding.

let mut state_machine = Parser {
url,
input: ReversibleCharIterator::new(&filtered_input),
Expand Down

0 comments on commit de80a35

Please sign in to comment.