refactor: remove --time flags in favor of cargo time command (#58)

This commit is contained in:
Felix Spöttel
2023-12-13 11:55:38 +01:00
committed by GitHub
parent 234ac70c4e
commit 335f2631a0
6 changed files with 48 additions and 36 deletions

View File

@@ -2,7 +2,7 @@ use std::process::{Command, Stdio};
use crate::template::Day;
pub fn handle(day: Day, release: bool, time: bool, dhat: bool, submit_part: Option<u8>) {
pub fn handle(day: Day, release: bool, dhat: bool, submit_part: Option<u8>) {
let mut cmd_args = vec!["run".to_string(), "--bin".to_string(), day.to_string()];
if dhat {
@@ -23,10 +23,6 @@ pub fn handle(day: Day, release: bool, time: bool, dhat: bool, submit_part: Opti
cmd_args.push(submit_part.to_string());
}
if time {
cmd_args.push("--time".to_string());
}
let mut cmd = Command::new("cargo")
.args(&cmd_args)
.stdout(Stdio::inherit())