Skip to content

Commit

Permalink
avoid newly stable method
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Whitehead <[email protected]>
  • Loading branch information
andrewwhitehead committed Aug 3, 2023
1 parent 25a15e2 commit 3b5c2b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/data_types/rev_status_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl RevocationStatusList {
}
let slots_count = self.revocation_list.len();
if let Some(issued) = issued {
if let Some(max_idx) = issued.last().copied() {
if let Some(max_idx) = issued.iter().last().copied() {
if max_idx as usize >= slots_count {
return Err(Error::from_msg(
crate::ErrorKind::Unexpected,
Expand All @@ -106,7 +106,7 @@ impl RevocationStatusList {
}
}
if let Some(revoked) = revoked {
if let Some(max_idx) = revoked.last().copied() {
if let Some(max_idx) = revoked.iter().last().copied() {
if max_idx as usize >= slots_count {
return Err(Error::from_msg(
crate::ErrorKind::Unexpected,
Expand Down

0 comments on commit 3b5c2b2

Please sign in to comment.