From c824d095a7ed2f028520f3a0e7df4ed536cf2bc1 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Wed, 19 Feb 2020 07:09:54 -0500 Subject: [PATCH] tests: use std::env::consts::EXE_SUFFIX This avoids a conditional compilation knob and is likely more portable. --- tests/util.rs | 6 +----- 1 file changed, 1 insertion(+), 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) => {