We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
--release
cargo all
1 parent 8b6ec2b commit b8b688fCopy full SHA for b8b688f
src/main.rs
@@ -10,10 +10,12 @@ fn main() {
10
.map(|day| {
11
let day = format!("{:02}", day);
12
13
- let cmd = Command::new("cargo")
14
- .args(["run", "--release", "--bin", &day])
15
- .output()
16
- .unwrap();
+ let mut args = vec!["run", "--bin", &day];
+ if cfg!(not(debug_assertions)) {
+ args.push("--release");
+ }
17
+
18
+ let cmd = Command::new("cargo").args(&args).output().unwrap();
19
20
println!("----------");
21
println!("{}| Day {} |{}", ANSI_BOLD, day, ANSI_RESET);
0 commit comments