Skip to content

Commit

Permalink
cert: fix clippy get_first finding
Browse files Browse the repository at this point in the history
```
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)]`
```
  • Loading branch information
cpu authored and djc committed Dec 29, 2023
1 parent b528297 commit 4a80225
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4a80225

Please sign in to comment.