diff options
author | Ville Penttinen <[email protected]> | 2019-02-13 15:42:15 +0000 |
---|---|---|
committer | Ville Penttinen <[email protected]> | 2019-02-13 15:42:15 +0000 |
commit | 0c37a9cc28a38e87a136e0cad9dcc5512c64029c (patch) | |
tree | 71fd822c1a9c0ba8f78ec42aa56708d487ecfc2f | |
parent | d9905f7be52c17335fb529a63b2afbefee7466b4 (diff) |
Use cloned over map + clone
-rw-r--r-- | crates/ra_ide_api/src/symbol_index.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/symbol_index.rs b/crates/ra_ide_api/src/symbol_index.rs index 62d0979fe..100df8279 100644 --- a/crates/ra_ide_api/src/symbol_index.rs +++ b/crates/ra_ide_api/src/symbol_index.rs | |||
@@ -228,7 +228,7 @@ fn source_file_to_file_symbols(source_file: &SourceFile, file_id: FileId) -> Vec | |||
228 | match event { | 228 | match event { |
229 | WalkEvent::Enter(node) => { | 229 | WalkEvent::Enter(node) => { |
230 | if let Some(mut symbol) = to_file_symbol(node, file_id) { | 230 | 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(); |
232 | 232 | ||
233 | stack.push(symbol.name.clone()); | 233 | stack.push(symbol.name.clone()); |
234 | symbols.push(symbol); | 234 | symbols.push(symbol); |