@@ -254,13 +254,13 @@ pub(crate) fn auto_import_all(acc: &mut Assists, ctx: &AssistContext<'_>) -> Opt
254
254
all_insert_use_actions. push ( ( chosen_import. clone ( ) , scope, range, edition) ) ;
255
255
}
256
256
257
- let group_label = GroupLabel ( "Import all missing items" . to_string ( ) ) ;
257
+ let group_label = GroupLabel ( "Import all missing items" . to_owned ( ) ) ;
258
258
let assist_id = AssistId ( "auto_import_all" , AssistKind :: QuickFix ) ;
259
259
let label = "Import all missing items" ;
260
260
261
261
// add the same import all action in all the places where we need import
262
262
for ( _, scope, range, _) in & all_insert_use_actions {
263
- acc. add_group ( & group_label, assist_id, label, range. clone ( ) , |builder| {
263
+ acc. add_group ( & group_label, assist_id, label, * range, |builder| {
264
264
let path_alias = gen_insert_args (
265
265
scope,
266
266
importable_nodes. iter ( ) . map ( |( import_assets, _) | import_assets) ,
@@ -1914,7 +1914,7 @@ fn main() {
1914
1914
Foo;
1915
1915
Bar;
1916
1916
}
1917
- " , // FIXME(discord9): the resulting import have a strange whitespace after newline of the new import
1917
+ " , // FIXME(discord9): the resulting import have a strange whitespace after newline of the new import
1918
1918
r"
1919
1919
mod foo { pub struct Foo; }
1920
1920
mod bar {
@@ -1930,7 +1930,8 @@ fn main() {
1930
1930
Foo;
1931
1931
Bar;
1932
1932
}
1933
- " , "Import all missing items"
1933
+ " ,
1934
+ "Import all missing items" ,
1934
1935
)
1935
1936
}
1936
1937
0 commit comments