mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Use cloned over map + clone
This commit is contained in:
parent
d9905f7be5
commit
0c37a9cc28
1 changed files with 1 additions and 1 deletions
|
@ -228,7 +228,7 @@ fn source_file_to_file_symbols(source_file: &SourceFile, file_id: FileId) -> Vec
|
|||
match event {
|
||||
WalkEvent::Enter(node) => {
|
||||
if let Some(mut symbol) = to_file_symbol(node, file_id) {
|
||||
symbol.container_name = stack.last().map(|v: &SmolStr| v.clone());
|
||||
symbol.container_name = stack.last().cloned();
|
||||
|
||||
stack.push(symbol.name.clone());
|
||||
symbols.push(symbol);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue