diff options
author | Aleksey Kladov <[email protected]> | 2019-02-08 11:49:43 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-02-08 11:49:43 +0000 |
commit | 12e3b4c70b5ef23b2fdfc197296d483680e125f9 (patch) | |
tree | 71baa0e0a62f9f6b61450501c5f821f67badf9e4 /crates/ra_assists/src/split_import.rs | |
parent | 5cb1d41a30d25cbe136402644bf5434dd667f1e5 (diff) |
reformat the world
Diffstat (limited to 'crates/ra_assists/src/split_import.rs')
-rw-r--r-- | crates/ra_assists/src/split_import.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/ra_assists/src/split_import.rs b/crates/ra_assists/src/split_import.rs index 7e34be087..fb69cef9c 100644 --- a/crates/ra_assists/src/split_import.rs +++ b/crates/ra_assists/src/split_import.rs | |||
@@ -8,9 +8,7 @@ use ra_syntax::{ | |||
8 | use crate::{AssistCtx, Assist}; | 8 | use crate::{AssistCtx, Assist}; |
9 | 9 | ||
10 | pub(crate) fn split_import(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { | 10 | pub(crate) fn split_import(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { |
11 | let colon_colon = ctx | 11 | let colon_colon = ctx.leaf_at_offset().find(|leaf| leaf.kind() == COLONCOLON)?; |
12 | .leaf_at_offset() | ||
13 | .find(|leaf| leaf.kind() == COLONCOLON)?; | ||
14 | let path = colon_colon.parent().and_then(ast::Path::cast)?; | 12 | let path = colon_colon.parent().and_then(ast::Path::cast)?; |
15 | let top_path = generate(Some(path), |it| it.parent_path()).last()?; | 13 | let top_path = generate(Some(path), |it| it.parent_path()).last()?; |
16 | 14 | ||