@@ -34,8 +34,7 @@ pub enum OutputMode {
3434/// If you want to allow failures, use [allow_failure].
3535/// If you want to delay failures until the end of bootstrap, use [delay_failure].
3636///
37- /// By default, the command will print its stdout/stderr to stdout/stderr of bootstrap
38- /// ([OutputMode::Print]).
37+ /// By default, the command will print its stdout/stderr to stdout/stderr of bootstrap ([OutputMode::Print]).
3938/// If you want to handle the output programmatically, use [BootstrapCommand::capture].
4039///
4140/// Bootstrap will print a debug log to stdout if the command fails and failure is not allowed.
@@ -144,8 +143,8 @@ impl From<Command> for BootstrapCommand {
144143 }
145144}
146145
147- /// Represents the outcome of starting a command .
148- enum CommandOutcome {
146+ /// Represents the current status of `BootstrapCommand` .
147+ enum CommandStatus {
149148 /// The command has started and finished with some status.
150149 Finished ( ExitStatus ) ,
151150 /// It was not even possible to start the command.
@@ -155,20 +154,20 @@ enum CommandOutcome {
155154/// Represents the output of an executed process.
156155#[ allow( unused) ]
157156pub struct CommandOutput {
158- outcome : CommandOutcome ,
157+ status : CommandStatus ,
159158 stdout : Vec < u8 > ,
160159 stderr : Vec < u8 > ,
161160}
162161
163162impl CommandOutput {
164163 pub fn did_not_start ( ) -> Self {
165- Self { outcome : CommandOutcome :: DidNotStart , stdout : vec ! [ ] , stderr : vec ! [ ] }
164+ Self { status : CommandStatus :: DidNotStart , stdout : vec ! [ ] , stderr : vec ! [ ] }
166165 }
167166
168167 pub fn is_success ( & self ) -> bool {
169- match self . outcome {
170- CommandOutcome :: Finished ( status) => status. success ( ) ,
171- CommandOutcome :: DidNotStart => false ,
168+ match self . status {
169+ CommandStatus :: Finished ( status) => status. success ( ) ,
170+ CommandStatus :: DidNotStart => false ,
172171 }
173172 }
174173
@@ -177,9 +176,9 @@ impl CommandOutput {
177176 }
178177
179178 pub fn status ( & self ) -> Option < ExitStatus > {
180- match self . outcome {
181- CommandOutcome :: Finished ( status) => Some ( status) ,
182- CommandOutcome :: DidNotStart => None ,
179+ match self . status {
180+ CommandStatus :: Finished ( status) => Some ( status) ,
181+ CommandStatus :: DidNotStart => None ,
183182 }
184183 }
185184
@@ -199,7 +198,7 @@ impl CommandOutput {
199198impl Default for CommandOutput {
200199 fn default ( ) -> Self {
201200 Self {
202- outcome : CommandOutcome :: Finished ( ExitStatus :: default ( ) ) ,
201+ status : CommandStatus :: Finished ( ExitStatus :: default ( ) ) ,
203202 stdout : vec ! [ ] ,
204203 stderr : vec ! [ ] ,
205204 }
@@ -209,7 +208,7 @@ impl Default for CommandOutput {
209208impl From < Output > for CommandOutput {
210209 fn from ( output : Output ) -> Self {
211210 Self {
212- outcome : CommandOutcome :: Finished ( output. status ) ,
211+ status : CommandStatus :: Finished ( output. status ) ,
213212 stdout : output. stdout ,
214213 stderr : output. stderr ,
215214 }
0 commit comments