mirror of
https://github.com/jht5945/buildj.git
synced 2025-12-29 18:30:05 +08:00
match -> unwrap_or_else
This commit is contained in:
@@ -49,12 +49,9 @@ fn do_with_buildin_arg_java(first_arg: &str, args: &Vec<String>) {
|
|||||||
if args.len() > 2 {
|
if args.len() > 2 {
|
||||||
cmd.args(&args[2..]);
|
cmd.args(&args[2..]);
|
||||||
}
|
}
|
||||||
match run_command_and_wait(&mut cmd) {
|
run_command_and_wait(&mut cmd).unwrap_or_else(|err| {
|
||||||
Err(err) => {
|
print_message(MessageType::ERROR, &format!("Exec java failed: {}", err));
|
||||||
print_message(MessageType::ERROR, &format!("Exec java failed: {}", err));
|
});
|
||||||
},
|
|
||||||
Ok(_) => (),
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user