Support checking whether std::process::ExitCode
represents success or failure
#113081
Labels
A-process
Area: `std::process` and `std::env`
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
IIUC there is no good way to check whether a
std::process::ExitCode
corresponds to success or failure. This is cumbersome, for example, when we want to check the exit code just before actually exiting.Can we add methods to
std::process::ExitCode
checking whether it is success or failure?It seems like
is_success
/is_failure
were considered when stabilizingstd::process::ExitCode
, but it was left as an unresolved question. #48711The text was updated successfully, but these errors were encountered: