From 04481ef5009942811c3b68c3f51357f073def67f Mon Sep 17 00:00:00 2001 From: Vadim Kharitonov Date: Thu, 13 Jul 2023 17:31:08 +0200 Subject: [PATCH] polish Joonas's comment --- compute_tools/src/configurator.rs | 1 - compute_tools/src/http/api.rs | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/compute_tools/src/configurator.rs b/compute_tools/src/configurator.rs index 32fd400d48..ceb83d59f2 100644 --- a/compute_tools/src/configurator.rs +++ b/compute_tools/src/configurator.rs @@ -43,7 +43,6 @@ fn configurator_main_loop(compute: Arc) { } } - pub fn launch_configurator(compute: Arc) -> thread::JoinHandle<()> { thread::Builder::new() .name("compute-configurator".into()) diff --git a/compute_tools/src/http/api.rs b/compute_tools/src/http/api.rs index 3c32912895..bcd62979b1 100644 --- a/compute_tools/src/http/api.rs +++ b/compute_tools/src/http/api.rs @@ -1,6 +1,5 @@ use std::convert::Infallible; use std::net::SocketAddr; -use std::str; use std::sync::Arc; use std::thread; @@ -143,7 +142,7 @@ async fn handle_configure_request( } let body_bytes = hyper::body::to_bytes(req.into_body()).await.unwrap(); - if let Ok(request) = serde_json::from_slice::(body_bytes) { + if let Ok(request) = serde_json::from_slice::(&body_bytes) { let spec = request.spec; let parsed_spec = match ParsedSpec::try_from(spec) {