@@ -25,16 +25,16 @@ pub enum OutputMode {
25
25
#[ derive( Debug ) ]
26
26
pub struct BootstrapCommand < ' a > {
27
27
pub command : & ' a mut Command ,
28
- pub failure_behavior : Option < BehaviorOnFailure > ,
28
+ pub failure_behavior : BehaviorOnFailure ,
29
29
pub output_mode : OutputMode ,
30
30
}
31
31
32
32
impl < ' a > BootstrapCommand < ' a > {
33
33
pub fn delay_failure ( self ) -> Self {
34
- Self { failure_behavior : Some ( BehaviorOnFailure :: DelayFail ) , ..self }
34
+ Self { failure_behavior : BehaviorOnFailure :: DelayFail , ..self }
35
35
}
36
36
pub fn fail_fast ( self ) -> Self {
37
- Self { failure_behavior : Some ( BehaviorOnFailure :: Exit ) , ..self }
37
+ Self { failure_behavior : BehaviorOnFailure :: Exit , ..self }
38
38
}
39
39
pub fn output_mode ( self , output_mode : OutputMode ) -> Self {
40
40
Self { output_mode, ..self }
@@ -43,6 +43,10 @@ impl<'a> BootstrapCommand<'a> {
43
43
44
44
impl < ' a > From < & ' a mut Command > for BootstrapCommand < ' a > {
45
45
fn from ( command : & ' a mut Command ) -> Self {
46
- Self { command, failure_behavior : None , output_mode : OutputMode :: SuppressOnSuccess }
46
+ Self {
47
+ command,
48
+ failure_behavior : BehaviorOnFailure :: Exit ,
49
+ output_mode : OutputMode :: SuppressOnSuccess ,
50
+ }
47
51
}
48
52
}
0 commit comments