Skip to content

Commit

Permalink
Use impl Trait instead of an unnecessarily-named parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
briansmith committed Apr 11, 2021
1 parent 6c334a2 commit 2208a22
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/end_entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,10 @@ impl<'a> EndEntityCert<'a> {
/// Requires the `alloc` default feature; i.e. this isn't available in
/// `#![no_std]` configurations.
#[cfg(feature = "alloc")]
pub fn verify_is_valid_for_at_least_one_dns_name<'names, Names>(
pub fn verify_is_valid_for_at_least_one_dns_name<'names>(
&self,
dns_names: Names,
) -> Result<Vec<DnsNameRef<'names>>, Error>
where
Names: Iterator<Item = DnsNameRef<'names>>,
{
dns_names: impl Iterator<Item = DnsNameRef<'names>>,
) -> Result<Vec<DnsNameRef<'names>>, Error> {
let result: Vec<DnsNameRef<'names>> = dns_names
.filter(|n| self.verify_is_valid_for_dns_name(*n).is_ok())
.collect();
Expand Down

0 comments on commit 2208a22

Please sign in to comment.