Skip to content

Commit 2e89280

Browse files
committed
Remove unused ExitCode field of ErrorString
1 parent 2517b94 commit 2e89280

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub fn lib_main() {
2727
match run() {
2828
Err(err) => {
2929
eprintln!("Error: {}", err.message);
30-
process::exit(err.exit_code);
30+
process::exit(1);
3131
}
3232
Ok(Some(exit_code)) => {
3333
process::exit(exit_code);
@@ -56,7 +56,6 @@ pub fn run() -> Result<Option<i32>, ErrorString> {
5656

5757
pub struct ErrorString {
5858
pub message: Box<dyn fmt::Display + Send>,
59-
pub exit_code: i32,
6059
}
6160

6261
impl fmt::Debug for ErrorString {
@@ -72,7 +71,6 @@ where
7271
fn from(err: T) -> Self {
7372
ErrorString {
7473
message: Box::new(err),
75-
exit_code: 1,
7674
}
7775
}
7876
}

0 commit comments

Comments
 (0)