Skip to content

Commit 1cbda61

Browse files
committed
chore: add use case for PathSegment::qualifying_trait
1 parent bc97821 commit 1cbda61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ide-assists/src/handlers/unqualify_method_call.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ fn add_import(
9191
) {
9292
if let Some(path_segment) = qualifier.segment() {
9393
// for `<i32 as std::ops::Add>`
94-
let path_type = path_segment.syntax().children().filter_map(ast::PathType::cast).last();
94+
let path_type = path_segment.qualifying_trait();
9595
let import = match path_type {
9696
Some(it) => {
9797
if let Some(path) = it.path() {

0 commit comments

Comments
 (0)