mirror of
https://github.com/Noratrieb/cargo-minimize.git
synced 2026-01-14 16:35:01 +01:00
ctrlc
This commit is contained in:
parent
729deb5110
commit
961ba86e59
6 changed files with 129 additions and 27 deletions
|
|
@ -1,4 +1,7 @@
|
|||
use std::{process::Command, sync::Mutex};
|
||||
use std::{
|
||||
process::Command,
|
||||
sync::{atomic::AtomicBool, Mutex, Arc},
|
||||
};
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
use cargo_minimize::Options;
|
||||
|
|
@ -51,7 +54,7 @@ pub fn run_test(code: &str, minimizes_to: &str, options: impl FnOnce(&mut Option
|
|||
opts.path = path;
|
||||
options(&mut opts);
|
||||
|
||||
cargo_minimize::minimize(opts)?;
|
||||
cargo_minimize::minimize(opts, Arc::new(AtomicBool::new(false)))?;
|
||||
|
||||
let minimized_main_rs = std::fs::read_to_string(main_rs)?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue