src/api2/node/tasks.rs - extract_upid: avoid duplicate error message

This commit is contained in:
Dietmar Maurer 2019-12-10 13:45:56 +01:00
parent 5830c20560
commit 8560fe3e5f

View File

@ -48,12 +48,7 @@ fn extract_upid(param: &Value) -> Result<UPID, Error> {
let upid_str = tools::required_string_param(&param, "upid")?;
let upid = match upid_str.parse::<UPID>() {
Ok(v) => v,
Err(err) => bail!("unable to parse UPID '{}' - {}", upid_str, err),
};
Ok(upid)
upid_str.parse::<UPID>()
}
fn read_task_log(