Skip to content

Commit fc258de

Browse files
committed
Make QualPathTy case readable
1 parent 132a6ce commit fc258de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ pub(crate) fn into_to_qualified_from(acc: &mut Assists, ctx: &AssistContext<'_>)
6666
|edit| {
6767
edit.replace(
6868
method_call.syntax().text_range(),
69-
if sc.chars().find(|c| !c.is_alphanumeric() && c != &':').is_some() {
70-
format!("<{}>::from({})", sc, receiver)
71-
} else {
69+
if sc.chars().all(|c| c.is_alphanumeric() || c == ':') {
7270
format!("{}::from({})", sc, receiver)
71+
} else {
72+
format!("<{}>::from({})", sc, receiver)
7373
},
7474
);
7575
},

0 commit comments

Comments
 (0)