Skip to content

Commit ec61abb

Browse files
committed
reduced the tests to their bare essence
1 parent 5beddf9 commit ec61abb

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

crates/ide_assists/src/handlers/extract_function.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4346,11 +4346,9 @@ pub struct Foo {
43464346
}
43474347
43484348
pub fn testfn(arg: &mut Foo) {
4349-
$0arg.field = 8; // write access
4350-
println!("{}", arg.field); // read access$0
4349+
$0arg.field = 8;$0
43514350
// Simulating access after the extracted portion
4352-
arg.field = 16; // write access
4353-
println!("{}", arg.field); // read access
4351+
arg.field = 16;
43544352
}
43554353
"#,
43564354
r#"
@@ -4359,15 +4357,13 @@ pub struct Foo {
43594357
}
43604358
43614359
pub fn testfn(arg: &mut Foo) {
4362-
fun_name(arg); // read access
4360+
fun_name(arg);
43634361
// Simulating access after the extracted portion
4364-
arg.field = 16; // write access
4365-
println!("{}", arg.field); // read access
4362+
arg.field = 16;
43664363
}
43674364
43684365
fn $0fun_name(arg: &mut Foo) {
43694366
arg.field = 8;
4370-
println!("{}", arg.field);
43714367
}
43724368
"#,
43734369
);
@@ -4383,8 +4379,7 @@ pub struct Foo {
43834379
}
43844380
43854381
pub fn testfn(arg: &mut Foo) {
4386-
$0arg.field = 8; // write access
4387-
println!("{}", arg.field); // read access$0
4382+
$0arg.field = 8;$0
43884383
}
43894384
"#,
43904385
r#"
@@ -4393,12 +4388,11 @@ pub struct Foo {
43934388
}
43944389
43954390
pub fn testfn(arg: &mut Foo) {
4396-
fun_name(arg); // read access
4391+
fun_name(arg);
43974392
}
43984393
43994394
fn $0fun_name(arg: &mut Foo) {
44004395
arg.field = 8;
4401-
println!("{}", arg.field);
44024396
}
44034397
"#,
44044398
);

0 commit comments

Comments
 (0)