mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-26 05:44:26 +00:00
readability
This commit is contained in:
parent
1a950cdbcf
commit
98d769a799
@ -10,7 +10,10 @@ pub(crate) fn split_import(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assis
|
||||
let path = ast::Path::cast(colon_colon.parent())?;
|
||||
let top_path = successors(Some(path), |it| it.parent_path()).last()?;
|
||||
|
||||
let _use_tree = top_path.syntax().ancestors().find_map(ast::UseTree::cast)?;
|
||||
let use_tree = top_path.syntax().ancestors().find_map(ast::UseTree::cast);
|
||||
if use_tree.is_none() {
|
||||
return None;
|
||||
}
|
||||
|
||||
let l_curly = colon_colon.range().end();
|
||||
let r_curly = match top_path.syntax().parent().and_then(ast::UseTree::cast) {
|
||||
|
Loading…
Reference in New Issue
Block a user