diff options
author | Andrew Gallant <jamslam@gmail.com> | 2020-02-19 07:09:54 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2020-02-20 16:07:51 -0500 |
commit | c824d095a7ed2f028520f3a0e7df4ed536cf2bc1 (patch) | |
tree | cc281bfe69a8c94240f8f895ec07c606abf17b98 /tests | |
parent | ee21897ebd35fc875a790b7ef0192609e81489f0 (diff) |
tests: use std::env::consts::EXE_SUFFIX
This avoids a conditional compilation knob and is likely more portable.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/util.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/util.rs b/tests/util.rs index daba256b..9256ca33 100644 --- a/tests/util.rs +++ b/tests/util.rs @@ -172,11 +172,7 @@ impl Dir { /// Returns the path to the ripgrep executable. pub fn bin(&self) -> process::Command { - let rg = if cfg!(windows) { - self.root.join("../rg.exe") - } else { - self.root.join("../rg") - }; + let rg = self.root.join(format!("../rg{}", env::consts::EXE_SUFFIX)); match cross_runner() { None => process::Command::new(rg), Some(runner) => { |