From 4a80225ff46830293159dd917cb4b350ca4e790c Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Thu, 28 Dec 2023 13:15:23 -0500 Subject: [PATCH] cert: fix clippy get_first finding ``` error: accessing first element with `crl_distribution_points.get(0)` --> src/cert.rs:620:13 | 620 | / crl_distribution_points 621 | | .get(0) | |_______________________^ help: try: `crl_distribution_points.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `-D clippy::get-first` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::get_first)]` ``` --- src/cert.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cert.rs b/src/cert.rs index e9989e5a..df7a5fcb 100644 --- a/src/cert.rs +++ b/src/cert.rs @@ -618,7 +618,7 @@ mod tests { // There should be two distribution points present. let (point_a, point_b): (&CrlDistributionPoint, &CrlDistributionPoint) = ( crl_distribution_points - .get(0) + .first() .expect("missing first distribution point"), crl_distribution_points .get(1)