]> git.lizzy.rs Git - rust.git/commitdiff
ExitStatusError: Be more verbose in Display impl
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 4 May 2021 13:31:48 +0000 (14:31 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 12 May 2021 10:12:19 +0000 (11:12 +0100)
Co-authored-by: Jane Lusby <jlusby@yaah.dev>
library/std/src/process.rs

index e9d807134003e7032170f56164b3fcd2e347c027..9252aba903f51ca58da75dc71971f54cce41d5c0 100644 (file)
@@ -1607,7 +1607,7 @@ fn into(self) -> ExitStatus {
 #[unstable(feature = "exit_status_error", issue = "84908")]
 impl fmt::Display for ExitStatusError {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        self.into_status().fmt(f)
+        write!(f, "process exited unsuccessfully: {}", self.into_status())
     }
 }