Skip to content

Commit

Permalink
Apply Clippy-suggested fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
partim committed Nov 17, 2023
1 parent cd9ff7d commit 4b1e066
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ca/publication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ impl Query {
}
}

if pdus.get(0) == Some(&QueryPdu::List) {
if pdus.first() == Some(&QueryPdu::List) {
Ok(Query::List)
} else {
let mut delta = PublishDelta::default();
Expand Down Expand Up @@ -974,7 +974,7 @@ impl Reply {
pdu_element.take_end(reader)?;
}

let reply_kind = match pdus.get(0) {
let reply_kind = match pdus.first() {
Some(el) => el.kind(),
None => ReplyPduType::List
};
Expand Down
3 changes: 2 additions & 1 deletion src/crypto/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ use ring::error::Unspecified;
use ring::signature::VerificationAlgorithm;
use untrusted::Input;
use crate::oid;
use crate::util::{base64, hex};
#[cfg(feature = "serde")] use crate::util::base64;
use crate::util::hex;
use super::signature::{RpkiSignatureAlgorithm, Signature, SignatureAlgorithm};


Expand Down
1 change: 1 addition & 0 deletions src/repository/crl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ pub struct RevokedCertificatesIter(Captured);
impl Iterator for RevokedCertificatesIter {
type Item = CrlEntry;

#[allow(clippy::redundant_closure)]
fn next(&mut self) -> Option<Self::Item> {
self.0.decode_partial(|cons| CrlEntry::take_opt_from(cons)).unwrap()
}
Expand Down
1 change: 1 addition & 0 deletions src/repository/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pub struct Manifest {

impl Manifest {
/// Decodes a manifest from a source.
#[allow(clippy::redundant_closure)]
pub fn decode<S: IntoSource>(
source: S,
strict: bool
Expand Down

0 comments on commit 4b1e066

Please sign in to comment.