Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
Signed-off-by: Mathias Pius <contact@pius.io>
  • Loading branch information
MathiasPius committed Feb 15, 2024
1 parent 7ee4bcb commit c0f328b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ impl Client {

validate_registry_response(status, &body, &url)?;

Ok(serde_json::from_str(&std::str::from_utf8(&body)?)?)
Ok(serde_json::from_str(std::str::from_utf8(&body)?)?)
}

/// Pull an image and return the bytes
Expand Down Expand Up @@ -856,10 +856,10 @@ impl Client {

let text = std::str::from_utf8(&body)?;

self.validate_image_manifest(&text).await?;
self.validate_image_manifest(text).await?;

debug!("Parsing response as Manifest: {}", &text);
let manifest = serde_json::from_str(&text)
let manifest = serde_json::from_str(text)
.map_err(|e| OciDistributionError::ManifestParsingError(e.to_string()))?;
Ok((manifest, digest))
}
Expand Down

0 comments on commit c0f328b

Please sign in to comment.