src/api2/admin/datastore/h2upload.rs: code cleanups

This commit is contained in:
Dietmar Maurer 2019-05-08 08:12:49 +02:00
parent a66ab8ae5e
commit e3a44552ee
1 changed files with 2 additions and 7 deletions

View File

@ -182,13 +182,8 @@ fn upgrade_h2upload(
})
})
.select(abort_future.map_err(|_| {}).then(move |_| { bail!("task aborted"); }))
.then(|result| {
match result {
Ok((result,_)) => Ok(result),
Err((err, _)) => Err(err),
}
})
.and_then(|(result, _)| Ok(result))
.map_err(|(err, _)| err)
}).unwrap();
Ok(Box::new(futures::future::ok(