Skip to content

Commit

Permalink
url: remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwuelker committed Jul 29, 2024
1 parent 9c96557 commit ffa7ef3
Showing 1 changed file with 0 additions and 55 deletions.
55 changes: 0 additions & 55 deletions crates/url/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,61 +81,6 @@ pub fn is_double_dot_path_segment(input: &str) -> bool {
|| input.eq_ignore_ascii_case("%2e%2e")
}

/// <https://url.spec.whatwg.org/#url-code-points>
#[must_use]
pub fn is_url_codepoint(c: char) -> bool {
c.is_alphanumeric()
| match c {
'!' | '$' | '&' | '\'' | '(' | ')' | '*' | '+' | ',' | '-' | '.' | '/' | ':' | ';'
| '=' | '?' | '@' | '_' | '~' => true,
// range excludes surrogates and noncharacters
'\u{00A0}'..='\u{D7FF}' | '\u{E000}'..='\u{10FFFD}' => {
// check for noncharacters
// return true if c is not a noncharacter
!matches!(
c,
'\u{FDD0}'
..='\u{FDEF}'
| '\u{FFFE}'
| '\u{FFFF}'
| '\u{1FFFE}'
| '\u{1FFFF}'
| '\u{2FFFE}'
| '\u{2FFFF}'
| '\u{3FFFE}'
| '\u{3FFFF}'
| '\u{4FFFE}'
| '\u{4FFFF}'
| '\u{5FFFE}'
| '\u{5FFFF}'
| '\u{6FFFE}'
| '\u{6FFFF}'
| '\u{7FFFE}'
| '\u{7FFFF}'
| '\u{8FFFE}'
| '\u{8FFFF}'
| '\u{9FFFE}'
| '\u{9FFFF}'
| '\u{AFFFE}'
| '\u{AFFFF}'
| '\u{BFFFE}'
| '\u{BFFFF}'
| '\u{CFFFE}'
| '\u{CFFFF}'
| '\u{DFFFE}'
| '\u{DFFFF}'
| '\u{EFFFE}'
| '\u{EFFFF}'
| '\u{FFFFE}'
| '\u{FFFFF}'
| '\u{10FFFE}'
| '\u{10FFFF}'
)
},
_ => false,
}
}

#[cfg(test)]
mod tests {
use super::starts_with_windows_drive_letter;
Expand Down

0 comments on commit ffa7ef3

Please sign in to comment.