From 1f84ac052b29186748ea6e137685b705e6574d8c Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 19 Jan 2023 11:26:46 +0100 Subject: [PATCH] api: node tasks: small cleanups Signed-off-by: Thomas Lamprecht --- src/api2/node/tasks.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/api2/node/tasks.rs b/src/api2/node/tasks.rs index d60f9efe..d386f805 100644 --- a/src/api2/node/tasks.rs +++ b/src/api2/node/tasks.rs @@ -296,9 +296,7 @@ async fn get_task_status(param: Value, rpcenv: &mut dyn RpcEnvironment) -> Resul } fn extract_upid(param: &Value) -> Result { - let upid_str = pbs_tools::json::required_string_param(param, "upid")?; - - upid_str.parse::() + pbs_tools::json::required_string_param(param, "upid")?.parse::() } #[sortable] @@ -559,8 +557,7 @@ pub fn list_tasks( if let Some(since) = since { if let Some(ref state) = info.state { if state.endtime() < since { - // we reached the tasks that ended before our 'since' - // so we can stop iterating + // we reached the tasks that ended before our 'since' so we can stop iterating break; } }