We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ExitCode
ErrorString
1 parent 2517b94 commit 2e89280Copy full SHA for 2e89280
src/lib.rs
@@ -27,7 +27,7 @@ pub fn lib_main() {
27
match run() {
28
Err(err) => {
29
eprintln!("Error: {}", err.message);
30
- process::exit(err.exit_code);
+ process::exit(1);
31
}
32
Ok(Some(exit_code)) => {
33
process::exit(exit_code);
@@ -56,7 +56,6 @@ pub fn run() -> Result<Option<i32>, ErrorString> {
56
57
pub struct ErrorString {
58
pub message: Box<dyn fmt::Display + Send>,
59
- pub exit_code: i32,
60
61
62
impl fmt::Debug for ErrorString {
@@ -72,7 +71,6 @@ where
72
71
fn from(err: T) -> Self {
73
ErrorString {
74
message: Box::new(err),
75
- exit_code: 1,
76
77
78
0 commit comments