We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3df105 commit 573d5a2Copy full SHA for 573d5a2
tests/integration_tests.rs
@@ -1,5 +1,4 @@
1
use std::{
2
- env::{self, consts::EXE_SUFFIX},
3
process::{Command, Stdio},
4
str::from_utf8,
5
};
@@ -40,20 +39,7 @@ impl<'a> Cmd<'a> {
40
39
41
#[track_caller]
42
fn assert(&self, success: bool) {
43
- let rustlings_bin = {
44
- let mut path = env::current_exe().unwrap();
45
- // Pop test binary name
46
- path.pop();
47
- // Pop `/deps`
48
49
-
50
- path.push("rustlings");
51
- let mut path = path.into_os_string();
52
- path.push(EXE_SUFFIX);
53
- path
54
- };
55
56
- let mut cmd = Command::new(rustlings_bin);
+ let mut cmd = Command::new(env!("CARGO_BIN_EXE_rustlings"));
57
58
if let Some(current_dir) = self.current_dir {
59
cmd.current_dir(current_dir);
0 commit comments