mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
minor: replace panics with types
This commit is contained in:
parent
174c439c56
commit
3836b195dd
2 changed files with 15 additions and 21 deletions
|
@ -280,7 +280,7 @@ fn convert_tokens<C: TokenConvertor>(conv: &mut C) -> tt::Subtree {
|
|||
parent.subtree.token_trees.extend(entry.subtree.token_trees);
|
||||
}
|
||||
|
||||
let subtree = stack.into_first().subtree;
|
||||
let subtree = stack.into_last().subtree;
|
||||
if let [tt::TokenTree::Subtree(first)] = &*subtree.token_trees {
|
||||
first.clone()
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue