Remove clone from multiline comments

This commit is contained in:
ConnorSkees 2020-01-19 00:29:45 -05:00
parent 635f00baa6
commit 07cb3a4ac7

View File

@ -532,16 +532,15 @@ pub(crate) fn eat_expr<I: Iterator<Item = Token>>(
let tok = toks
.next()
.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);
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 {
values.push(tok.clone())
values.push(tok);
}
}
TokenKind::AtRule(AtRule::Include) => {