mirror of https://github.com/briansmith/webpki
NFC: Address Clippy `needless_borrow` complaints.
This commit is contained in:
parent
ad1fe9288e
commit
d16bafbba4
|
@ -29,7 +29,6 @@ cargo clippy \
|
|||
--allow clippy::clone_on_copy \
|
||||
--allow clippy::explicit_auto_deref \
|
||||
--allow clippy::len_without_is_empty \
|
||||
--allow clippy::needless_borrow \
|
||||
--allow clippy::new_without_default \
|
||||
--allow clippy::octal_escapes \
|
||||
--allow clippy::redundant_closure \
|
||||
|
|
|
@ -139,7 +139,7 @@ impl<'a> EndEntityCert<'a> {
|
|||
|
||||
/// Verifies that the certificate is valid for the given DNS host name.
|
||||
pub fn verify_is_valid_for_dns_name(&self, dns_name: DnsNameRef) -> Result<(), Error> {
|
||||
name::verify_cert_dns_name(&self, dns_name)
|
||||
name::verify_cert_dns_name(self, dns_name)
|
||||
}
|
||||
|
||||
/// Verifies that the certificate is valid for at least one of the given DNS
|
||||
|
|
|
@ -755,7 +755,7 @@ mod tests {
|
|||
if line == end_section {
|
||||
break;
|
||||
}
|
||||
base64.push_str(&line);
|
||||
base64.push_str(line);
|
||||
}
|
||||
|
||||
base64::decode(&base64).unwrap()
|
||||
|
|
|
@ -125,7 +125,7 @@ fn build_chain_inner(
|
|||
let name_constraints = trust_anchor.name_constraints.map(untrusted::Input::from);
|
||||
|
||||
untrusted::read_all_optional(name_constraints, Error::BadDer, |value| {
|
||||
name::check_name_constraints(value, &cert)
|
||||
name::check_name_constraints(value, cert)
|
||||
})?;
|
||||
|
||||
let trust_anchor_spki = untrusted::Input::from(trust_anchor.spki);
|
||||
|
@ -149,7 +149,7 @@ fn build_chain_inner(
|
|||
|
||||
loop_while_non_fatal_error(intermediate_certs, |cert_der| {
|
||||
let potential_issuer =
|
||||
cert::parse_cert(untrusted::Input::from(*cert_der), EndEntityOrCa::Ca(&cert))?;
|
||||
cert::parse_cert(untrusted::Input::from(*cert_der), EndEntityOrCa::Ca(cert))?;
|
||||
|
||||
if potential_issuer.subject != cert.issuer {
|
||||
return Err(Error::UnknownIssuer.into());
|
||||
|
@ -174,7 +174,7 @@ fn build_chain_inner(
|
|||
}
|
||||
|
||||
untrusted::read_all_optional(potential_issuer.name_constraints, Error::BadDer, |value| {
|
||||
name::check_name_constraints(value, &cert)
|
||||
name::check_name_constraints(value, cert)
|
||||
})?;
|
||||
|
||||
let next_sub_ca_count = match used_as_ca {
|
||||
|
|
Loading…
Reference in New Issue