1
Fork 0

use CursorRef more, to not to clone Trees

This commit is contained in:
klensy 2022-05-16 18:58:15 +03:00
parent 10b3a0d209
commit cc5f3e21ac
10 changed files with 35 additions and 24 deletions

View file

@ -552,7 +552,7 @@ impl MetaItemKind {
) -> Option<MetaItemKind> {
match tokens.next() {
Some(TokenTree::Delimited(_, Delimiter::Invisible, inner_tokens)) => {
MetaItemKind::name_value_from_tokens(&mut inner_tokens.trees())
MetaItemKind::name_value_from_tokens(&mut inner_tokens.into_trees())
}
Some(TokenTree::Token(token)) => {
Lit::from_token(&token).ok().map(MetaItemKind::NameValue)