mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 13:06:28 +03:00
add new command state in execution context
This commit is contained in:
@@ -29,6 +29,17 @@ pub struct CommandCache {
|
||||
cache: Mutex<HashMap<CommandCacheKey, CommandOutput>>,
|
||||
}
|
||||
|
||||
enum CommandState<'a> {
|
||||
Cached(CommandOutput),
|
||||
Deferred {
|
||||
process: Option<Result<Child, std::io::Error>>,
|
||||
command: &'a mut BootstrapCommand,
|
||||
stdout: OutputMode,
|
||||
stderr: OutputMode,
|
||||
executed_at: &'a Location<'a>,
|
||||
},
|
||||
}
|
||||
|
||||
impl CommandCache {
|
||||
pub fn new() -> Self {
|
||||
Self { cache: Mutex::new(HashMap::new()) }
|
||||
|
||||
Reference in New Issue
Block a user