aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src
diff options
context:
space:
mode:
authorJeremy Kolb <[email protected]>2019-07-05 15:18:01 +0100
committerJeremy Kolb <[email protected]>2019-07-05 15:18:01 +0100
commit98d769a799e430f152e573c28f101d9d6aee5376 (patch)
tree413d032bbb79928919cc0b4957d948539f6a552d /crates/ra_assists/src
parent1a950cdbcf5799d516f53a94fc9a6821e543ccc3 (diff)
readability
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r--crates/ra_assists/src/split_import.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_assists/src/split_import.rs b/crates/ra_assists/src/split_import.rs
index 99088d9a5..a8feb67c8 100644
--- a/crates/ra_assists/src/split_import.rs
+++ b/crates/ra_assists/src/split_import.rs
@@ -10,7 +10,10 @@ pub(crate) fn split_import(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assis
10 let path = ast::Path::cast(colon_colon.parent())?; 10 let path = ast::Path::cast(colon_colon.parent())?;
11 let top_path = successors(Some(path), |it| it.parent_path()).last()?; 11 let top_path = successors(Some(path), |it| it.parent_path()).last()?;
12 12
13 let _use_tree = top_path.syntax().ancestors().find_map(ast::UseTree::cast)?; 13 let use_tree = top_path.syntax().ancestors().find_map(ast::UseTree::cast);
14 if use_tree.is_none() {
15 return None;
16 }
14 17
15 let l_curly = colon_colon.range().end(); 18 let l_curly = colon_colon.range().end();
16 let r_curly = match top_path.syntax().parent().and_then(ast::UseTree::cast) { 19 let r_curly = match top_path.syntax().parent().and_then(ast::UseTree::cast) {