/// If `Error` is a `ProcessError` and it looks like a "normal exit", then it
/// flags that the `ProcessError` will be hidden.
///
/// Hidden errors won't get printed at the top-level as they propagate outwards
/// since it's trusted that the relevant program printed out all the relevant
/// information.


Hidden errors won't get printed at the top-level as they propagate outwards
since it's trusted that the relevant program printed out all the relevant
information.
Hidden errors won ' t get printed at the top - level as they propagate outwards since it ' s trusted that the relevant program printed out all the relevant information .
pub fn hide_normal_process_exit(error: Error, config: &Config) -> Error {
    if config.is_verbose() {
        return error;
    }
    let mut error = match error.downcast::<ProcessError>() {
        Ok(e) => e,
        Err(e) => return e,
    };
    if let Some(code) = error.status.code() {
        if 0 <= code && code < 128 && error.stdout.is_empty() && error.stderr.is_empty() {
            error.hidden = true;
        }
    }
    error.into()
}
pub fn hide_normal_process_exit ( error : Error , config : & Config ) -> Error { if config . is_verbose ( ) { return error ; } let mut error = match error . downcast :: < ProcessError > ( ) { Ok ( e ) => e , Err ( e ) => return e , } ; if let Some ( code ) = error . status . code ( ) { if 0 <= code && code < 128 && error . stdout . is_empty ( ) && error . stderr . is_empty ( ) { error . hidden = true ; } } error . into ( ) }
If `Error` is a `ProcessError` and it looks like a "normal exit", then it
flags that the `ProcessError` will be hidden.
If ` Error ` is a ` ProcessError ` and it looks like a " normal exit " then it flags that the ` ProcessError ` will be hidden .
error
Error
config
&Config