diff options
author | Phil Ellison <[email protected]> | 2020-12-30 15:52:36 +0000 |
---|---|---|
committer | Phil Ellison <[email protected]> | 2021-01-23 07:40:25 +0000 |
commit | 449ced4d218f413e152785fb81d161a6389974f7 (patch) | |
tree | 43ef0fd77b74bbc8d5ae78408f6d33d08c139fa7 /crates | |
parent | 1ff860b93c972e0f8d3a8ee582c255fa59e9b284 (diff) |
cargo fmt
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ide/src/diagnostics/fixes.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/ide/src/diagnostics/fixes.rs b/crates/ide/src/diagnostics/fixes.rs index 7bbf1d8c7..a73c0778b 100644 --- a/crates/ide/src/diagnostics/fixes.rs +++ b/crates/ide/src/diagnostics/fixes.rs | |||
@@ -14,7 +14,11 @@ use ide_db::{ | |||
14 | source_change::{FileSystemEdit, SourceChange}, | 14 | source_change::{FileSystemEdit, SourceChange}, |
15 | RootDatabase, | 15 | RootDatabase, |
16 | }; | 16 | }; |
17 | use syntax::{AstNode, TextRange, algo, ast::{self, ArgList, edit::IndentLevel, make}}; | 17 | use syntax::{ |
18 | algo, | ||
19 | ast::{self, edit::IndentLevel, make, ArgList}, | ||
20 | AstNode, TextRange, | ||
21 | }; | ||
18 | use text_edit::TextEdit; | 22 | use text_edit::TextEdit; |
19 | 23 | ||
20 | use crate::{diagnostics::Fix, references::rename::rename_with_semantics, FilePosition}; | 24 | use crate::{diagnostics::Fix, references::rename::rename_with_semantics, FilePosition}; |
@@ -151,7 +155,8 @@ impl DiagnosticWithFix for ReplaceFilterMapNextWithFindMap { | |||
151 | let filter_map_name_range = filter_map_call.name_ref()?.ident_token()?.text_range(); | 155 | let filter_map_name_range = filter_map_call.name_ref()?.ident_token()?.text_range(); |
152 | let filter_map_args = filter_map_call.syntax().children().find_map(ArgList::cast)?; | 156 | let filter_map_args = filter_map_call.syntax().children().find_map(ArgList::cast)?; |
153 | 157 | ||
154 | let range_to_replace = TextRange::new(filter_map_name_range.start(), next_expr.syntax().text_range().end()); | 158 | let range_to_replace = |
159 | TextRange::new(filter_map_name_range.start(), next_expr.syntax().text_range().end()); | ||
155 | let replacement = format!("find_map{}", filter_map_args.syntax().text()); | 160 | let replacement = format!("find_map{}", filter_map_args.syntax().text()); |
156 | let trigger_range = next_expr.syntax().text_range(); | 161 | let trigger_range = next_expr.syntax().text_range(); |
157 | 162 | ||