From 8560fe3e5f16a49c19c02c32e08dc7ebb4f23d91 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 10 Dec 2019 13:45:56 +0100 Subject: [PATCH] src/api2/node/tasks.rs - extract_upid: avoid duplicate error message --- src/api2/node/tasks.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/api2/node/tasks.rs b/src/api2/node/tasks.rs index d7f45eec..f2559a8c 100644 --- a/src/api2/node/tasks.rs +++ b/src/api2/node/tasks.rs @@ -48,12 +48,7 @@ fn extract_upid(param: &Value) -> Result { let upid_str = tools::required_string_param(¶m, "upid")?; - let upid = match upid_str.parse::() { - Ok(v) => v, - Err(err) => bail!("unable to parse UPID '{}' - {}", upid_str, err), - }; - - Ok(upid) + upid_str.parse::() } fn read_task_log(