Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Pan <[email protected]>
  • Loading branch information
tnytown committed Nov 16, 2023
1 parent ce59de2 commit 04ed874
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/fulcio/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,11 @@ impl FulcioClient {
));
}

let mut chain = certs
let cert = Certificate::from_der(chain[0].contents())?;

Check failure on line 259 in src/fulcio/mod.rs

View workflow job for this annotation

GitHub Actions / Test Suite

cannot find value `chain` in this scope

Check failure on line 259 in src/fulcio/mod.rs

View workflow job for this annotation

GitHub Actions / Check

cannot find value `chain` in this scope

Check failure on line 259 in src/fulcio/mod.rs

View workflow job for this annotation

GitHub Actions / Clippy

cannot find value `chain` in this scope
let chain = certs[1..]
.iter()
.map(|pem| Certificate::from_der(pem.contents()))
.collect::<std::result::Result<Vec<_>, _>>()?;
let cert = chain
.drain(..1)
.next()
.expect("failed to drain certificates of checked length!");

// TODO(tnytown): Implement SCT extraction.
// see: https://github.com/RustCrypto/formats/pull/1134
Expand Down

0 comments on commit 04ed874

Please sign in to comment.