use std::{path::Path, process::Command}; use crate::cli::Args; pub fn clean_ext(path: &Path, cli: &Args) { let mut args = vec!["clean", "--manifest-path", path.to_str().unwrap()]; if cli.dry_run { args.push("--dry-run"); } if cli.doc { args.push("--doc"); } Command::new("cargo") .args(args) .spawn() .unwrap() .wait_with_output() .unwrap(); }