diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-10-27 08:53:56 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-10-27 08:53:56 +0000 |
commit | c185f74fc9280dba1433ce53c9886ce524308c3d (patch) | |
tree | 3f470ea1e7f737e3d846eb77b006dc75023652ec /crates/ra_assists/src/assists/split_import.rs | |
parent | b85f6d522af7630ab227762076a9fbf75de502de (diff) | |
parent | 8118dc1bb9bc63670f72965e5115daa96e8c72fd (diff) |
Merge #2084
2084: use more consistent naming r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/assists/split_import.rs')
-rw-r--r-- | crates/ra_assists/src/assists/split_import.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/assists/split_import.rs b/crates/ra_assists/src/assists/split_import.rs index fe3e64af5..09bde1b72 100644 --- a/crates/ra_assists/src/assists/split_import.rs +++ b/crates/ra_assists/src/assists/split_import.rs | |||
@@ -8,7 +8,7 @@ use ra_syntax::{ast, AstNode, TextUnit, T}; | |||
8 | use crate::{Assist, AssistCtx, AssistId}; | 8 | use crate::{Assist, AssistCtx, AssistId}; |
9 | 9 | ||
10 | pub(crate) fn split_import(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { | 10 | pub(crate) fn split_import(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { |
11 | let colon_colon = ctx.token_at_offset().find(|leaf| leaf.kind() == T![::])?; | 11 | let colon_colon = ctx.find_token_at_offset(T![::])?; |
12 | let path = ast::Path::cast(colon_colon.parent())?; | 12 | let path = ast::Path::cast(colon_colon.parent())?; |
13 | let top_path = successors(Some(path), |it| it.parent_path()).last()?; | 13 | let top_path = successors(Some(path), |it| it.parent_path()).last()?; |
14 | 14 | ||