Is there a way to convert a.clone() to Arc::clone(&a) in rust-analyzer?

I would like to convert this code as follows

use std::sync::Arc;
fn main() {
    let a = Arc::new("hoge".to_string());
    let a2 = a.clone();
    let a3 = Arc::clone(&a);
    let a4 = <Arc<String> as Clone>::clone(&a);
    let a5 = &*a.clone();
    let a6 = <String as Clone>::clone(&*a);
}

to

fn main() {
    let a = Arc::new("hoge".to_string());
    let a2 = Arc::clone(&a);
    let a3 = Arc::clone(&a);
    let a4 = <Arc<String> as Clone>::clone(&a);
    let a5 = &*a.clone();
    let a6 = <String as Clone>::clone(&*a);
}

It would seem that Arc::<String>::clone($a) ==>> Arc::clone(&$a) would make this, but this did not make any difference.

I also considered using Angle-bracket Form UFCS

<Arc<String> as Clone>::clone($a) ==>>> Arc::<String>::clone(&$a)

but I got

Error: Parser Error: Failed to resolve path <Arc<String> as Clone>::clone.

error.

Is there a replacement command that can accomplish this?

There's also rerast project for AST-based find'n'replace:

1 Like