mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-29 14:33:29 +00:00
Make QualPathTy case readable
This commit is contained in:
parent
132a6ce8fc
commit
fc258de5a3
1 changed files with 3 additions and 3 deletions
|
@ -66,10 +66,10 @@ pub(crate) fn into_to_qualified_from(acc: &mut Assists, ctx: &AssistContext<'_>)
|
||||||
|edit| {
|
|edit| {
|
||||||
edit.replace(
|
edit.replace(
|
||||||
method_call.syntax().text_range(),
|
method_call.syntax().text_range(),
|
||||||
if sc.chars().find(|c| !c.is_alphanumeric() && c != &':').is_some() {
|
if sc.chars().all(|c| c.is_alphanumeric() || c == ':') {
|
||||||
format!("<{}>::from({})", sc, receiver)
|
|
||||||
} else {
|
|
||||||
format!("{}::from({})", sc, receiver)
|
format!("{}::from({})", sc, receiver)
|
||||||
|
} else {
|
||||||
|
format!("<{}>::from({})", sc, receiver)
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue