Remove clone from multiline comments
This commit is contained in:
parent
635f00baa6
commit
07cb3a4ac7
13
src/main.rs
13
src/main.rs
@ -532,16 +532,15 @@ pub(crate) fn eat_expr<I: Iterator<Item = Token>>(
|
|||||||
let tok = toks
|
let tok = toks
|
||||||
.next()
|
.next()
|
||||||
.expect("this must exist because we have already peeked");
|
.expect("this must exist because we have already peeked");
|
||||||
let s = if let TokenKind::MultilineComment(s) = &tok.kind {
|
|
||||||
s
|
|
||||||
} else {
|
|
||||||
unsafe { std::hint::unreachable_unchecked() }
|
|
||||||
};
|
|
||||||
devour_whitespace(toks);
|
devour_whitespace(toks);
|
||||||
if values.is_empty() {
|
if values.is_empty() {
|
||||||
return Ok(Some(Expr::MultilineComment(s.clone())));
|
let s = match tok.kind {
|
||||||
|
TokenKind::MultilineComment(s) => s,
|
||||||
|
_ => unsafe { std::hint::unreachable_unchecked() },
|
||||||
|
};
|
||||||
|
return Ok(Some(Expr::MultilineComment(s)));
|
||||||
} else {
|
} else {
|
||||||
values.push(tok.clone())
|
values.push(tok);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TokenKind::AtRule(AtRule::Include) => {
|
TokenKind::AtRule(AtRule::Include) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user