From 119b0c9607b98e41d508561739ae1b6481045bde Mon Sep 17 00:00:00 2001 From: Joonas Bergius Date: Wed, 23 Oct 2024 09:41:45 -0500 Subject: [PATCH] chore: address clippy feedback (#2959) Signed-off-by: Joonas Bergius Co-authored-by: schristoff <28318173+schristoff@users.noreply.github.com> --- src/injector/src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/injector/src/main.rs b/src/injector/src/main.rs index e1b9cc3dc5..c1312eb398 100644 --- a/src/injector/src/main.rs +++ b/src/injector/src/main.rs @@ -51,7 +51,7 @@ fn collect_binary_data(paths: &Vec) -> io::Result> { println!("Processing {}", path.display()); let new_content = get_file(path); buffer - .write(&new_content.unwrap()) + .write_all(&new_content.unwrap()) .expect("Could not add the file contents to the merged file buffer"); } @@ -143,14 +143,14 @@ async fn handler(Path(path): Path) -> Response { let name = caps.get(1).unwrap().as_str().to_string(); let reference = caps.get(2).unwrap().as_str().to_string(); handle_get_manifest(name, reference).await - } else if blob.is_match(&path) { + } else if blob.is_match(path) { let caps = blob.captures(path).unwrap(); let tag = caps.get(1).unwrap().as_str().to_string(); handle_get_digest(tag).await } else { Response::builder() .status(StatusCode::NOT_FOUND) - .body(format!("Not Found")) + .body("Not Found".to_string()) .unwrap() .into_response() } @@ -185,7 +185,7 @@ async fn handle_get_manifest(name: String, reference: String) -> Response { if sha_manifest.is_empty() { Response::builder() .status(StatusCode::NOT_FOUND) - .body(format!("Not Found")) + .body("Not Found".to_string()) .unwrap() .into_response() } else {