mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
cleanup qualify_path
This commit is contained in:
parent
b3d92052ce
commit
c2fd0c48a6
1 changed files with 0 additions and 2 deletions
|
@ -37,7 +37,6 @@ use crate::{
|
||||||
// ```
|
// ```
|
||||||
pub(crate) fn qualify_path(acc: &mut Assists, ctx: &AssistContext) -> Option<()> {
|
pub(crate) fn qualify_path(acc: &mut Assists, ctx: &AssistContext) -> Option<()> {
|
||||||
let (import_assets, syntax_under_caret) = find_importable_node(ctx)?;
|
let (import_assets, syntax_under_caret) = find_importable_node(ctx)?;
|
||||||
|
|
||||||
let mut proposed_imports = import_assets.search_for_relative_paths(&ctx.sema);
|
let mut proposed_imports = import_assets.search_for_relative_paths(&ctx.sema);
|
||||||
if proposed_imports.is_empty() {
|
if proposed_imports.is_empty() {
|
||||||
return None;
|
return None;
|
||||||
|
@ -92,7 +91,6 @@ pub(crate) fn qualify_path(acc: &mut Assists, ctx: &AssistContext) -> Option<()>
|
||||||
}
|
}
|
||||||
Some(())
|
Some(())
|
||||||
}
|
}
|
||||||
#[derive(Debug)]
|
|
||||||
pub(crate) enum QualifyCandidate<'db> {
|
pub(crate) enum QualifyCandidate<'db> {
|
||||||
QualifierStart(ast::PathSegment, Option<ast::GenericArgList>),
|
QualifierStart(ast::PathSegment, Option<ast::GenericArgList>),
|
||||||
UnqualifiedName(Option<ast::GenericArgList>),
|
UnqualifiedName(Option<ast::GenericArgList>),
|
||||||
|
|
Loading…
Reference in a new issue