Skip to content

Commit 0c37a9c

Browse files
committed
Use cloned over map + clone
1 parent d9905f7 commit 0c37a9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ra_ide_api/src/symbol_index.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ fn source_file_to_file_symbols(source_file: &SourceFile, file_id: FileId) -> Vec
228228
match event {
229229
WalkEvent::Enter(node) => {
230230
if let Some(mut symbol) = to_file_symbol(node, file_id) {
231-
symbol.container_name = stack.last().map(|v: &SmolStr| v.clone());
231+
symbol.container_name = stack.last().cloned();
232232

233233
stack.push(symbol.name.clone());
234234
symbols.push(symbol);

0 commit comments

Comments
 (0)