Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Bloom-dfinity committed Jan 11, 2022
1 parent 4930a45 commit a1560d5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ async fn forward_request(
name,
e
);
()
});
if name == "certificate" {
certificate = Some(match (certificate, bytes) {
Expand Down Expand Up @@ -481,8 +480,8 @@ fn validate_body(
logger: slog::Logger,
) -> anyhow::Result<bool> {
let cert: Certificate =
serde_cbor::from_slice(&certificate).map_err(AgentError::InvalidCborData)?;
let tree: HashTree = serde_cbor::from_slice(&tree).map_err(AgentError::InvalidCborData)?;
serde_cbor::from_slice(certificate).map_err(AgentError::InvalidCborData)?;
let tree: HashTree = serde_cbor::from_slice(tree).map_err(AgentError::InvalidCborData)?;

if let Err(e) = agent.verify(&cert) {
slog::trace!(logger, ">> certificate failed verification: {}", e);
Expand Down

0 comments on commit a1560d5

Please sign in to comment.