Skip to content

Commit 2a1adb3

Browse files
committed
Rename method.
1 parent 394ec96 commit 2a1adb3

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

tests/testsuite/build_script.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3172,11 +3172,11 @@ fn switch_features_rerun() {
31723172
.build();
31733173

31743174
p.cargo("build -v --features=foo").run();
3175-
p.safely_rename_run("foo", "with_foo").with_stdout("foo\n").run();
3175+
p.rename_run("foo", "with_foo").with_stdout("foo\n").run();
31763176
p.cargo("build -v").run();
3177-
p.safely_rename_run("foo", "without_foo").with_stdout("bar\n").run();
3177+
p.rename_run("foo", "without_foo").with_stdout("bar\n").run();
31783178
p.cargo("build -v --features=foo").run();
3179-
p.safely_rename_run("foo", "with_foo2").with_stdout("foo\n").run();
3179+
p.rename_run("foo", "with_foo2").with_stdout("foo\n").run();
31803180
}
31813181

31823182
#[test]

tests/testsuite/freshness.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ fn changing_bin_features_caches_targets() {
455455
",
456456
)
457457
.run();
458-
p.safely_rename_run("foo", "off1").with_stdout("feature off").run();
458+
p.rename_run("foo", "off1").with_stdout("feature off").run();
459459

460460
p.cargo("build --features foo")
461461
.with_stderr(
@@ -465,7 +465,7 @@ fn changing_bin_features_caches_targets() {
465465
",
466466
)
467467
.run();
468-
p.safely_rename_run("foo", "on1").with_stdout("feature on").run();
468+
p.rename_run("foo", "on1").with_stdout("feature on").run();
469469

470470
/* Targets should be cached from the first build */
471471

@@ -476,7 +476,7 @@ fn changing_bin_features_caches_targets() {
476476
",
477477
)
478478
.run();
479-
p.safely_rename_run("foo", "off2").with_stdout("feature off").run();
479+
p.rename_run("foo", "off2").with_stdout("feature off").run();
480480

481481
p.cargo("build --features foo")
482482
.with_stderr(
@@ -485,7 +485,7 @@ fn changing_bin_features_caches_targets() {
485485
",
486486
)
487487
.run();
488-
p.safely_rename_run("foo", "on2").with_stdout("feature on").run();
488+
p.rename_run("foo", "on2").with_stdout("feature on").run();
489489
}
490490

491491
#[test]

tests/testsuite/support/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ impl Project {
412412
/// method to run the executable. Each time you call this,
413413
/// use a new name for `dst`.
414414
/// See https://github.com/rust-lang/cargo/issues/5481
415-
pub fn safely_rename_run(&self, src: &str, dst: &str) -> Execs {
415+
pub fn rename_run(&self, src: &str, dst: &str) -> Execs {
416416
let src = self.bin(src);
417417
let dst = self.bin(dst);
418418
fs::rename(&src, &dst)

0 commit comments

Comments
 (0)