cleanup qualify_path

This commit is contained in:
Paweł Palenica 2021-10-20 23:39:25 -07:00
parent b3d92052ce
commit c2fd0c48a6

View file

@ -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>),