mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-14 14:46:37 +00:00
Fix fmt in bin_util.rs
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
e0c646e5b4
commit
36109cbcb4
1 changed files with 5 additions and 6 deletions
|
@ -37,12 +37,11 @@ impl Termination for MainExit {
|
|||
|
||||
impl MainExit {
|
||||
pub fn new(res: Result<()>, done: Option<Duration>) -> Self {
|
||||
res.map(|()| MainExit::Success(done))
|
||||
.unwrap_or_else(|err| {
|
||||
err.downcast::<BinstallError>()
|
||||
.map(MainExit::Error)
|
||||
.unwrap_or_else(MainExit::Report)
|
||||
})
|
||||
res.map(|()| MainExit::Success(done)).unwrap_or_else(|err| {
|
||||
err.downcast::<BinstallError>()
|
||||
.map(MainExit::Error)
|
||||
.unwrap_or_else(MainExit::Report)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue