Skip to content

Commit f28955b

Browse files
committed
Simplify iteration over bytes.
1 parent 0b14212 commit f28955b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tokenizer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ fn to_utf8(string_bytes: Vec<u8>) -> String {
853853

854854
fn consume_unquoted_url<'a>(tokenizer: &mut Tokenizer<'a>) -> Result<Token<'a>, ()> {
855855

856-
for (offset, c) in tokenizer.input[tokenizer.position..].as_bytes().iter().cloned().enumerate() {
856+
for (offset, c) in tokenizer.input[tokenizer.position..].bytes().enumerate() {
857857
match c {
858858
b' ' | b'\t' | b'\n' | b'\r' | b'\x0C' => {},
859859
b'"' | b'\'' => return Err(()), // Do not advance

0 commit comments

Comments
 (0)