Skip to content

Commit

Permalink
chore: address clippy feedback (#2959)
Browse files Browse the repository at this point in the history
Signed-off-by: Joonas Bergius <joonas@bergi.us>
Co-authored-by: schristoff <28318173+schristoff@users.noreply.github.com>
  • Loading branch information
joonas and schristoff authored Oct 23, 2024
1 parent aaa5ab2 commit 3c7dfe8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/injector/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fn collect_binary_data(paths: &Vec<PathBuf>) -> io::Result<Vec<u8>> {
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");
}

Expand Down Expand Up @@ -143,14 +143,14 @@ async fn handler(Path(path): Path<String>) -> 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()
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 3c7dfe8

Please sign in to comment.