fixup! feat: add inline_type_alias_uses assist

This commit is contained in:
Aleksandr Pak 2022-08-17 12:50:33 +03:00
parent 6d6356b103
commit 313b004ef7
No known key found for this signature in database
GPG Key ID: A3F6E3C0ECC46736

View File

@ -66,7 +66,7 @@ pub(crate) fn inline_type_alias_uses(acc: &mut Assists, ctx: &AssistContext<'_>)
.into_iter() .into_iter()
.filter_map(|file_ref| match file_ref.name { .filter_map(|file_ref| match file_ref.name {
ast::NameLike::NameRef(path_type) => { ast::NameLike::NameRef(path_type) => {
path_type.syntax().ancestors().find_map(ast::PathType::cast) path_type.syntax().ancestors().nth(3).and_then(ast::PathType::cast)
} }
_ => None, _ => None,
}) })