Skip to content

Commit

Permalink
rust: fix clippy 1.77 warning
Browse files Browse the repository at this point in the history
Ticket: 6883

error: field `0` is never read
  --> src/asn1/mod.rs:36:14
   |
36 |     BerError(Err<der_parser::error::BerError>),
   |     -------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     field in this variant
   |

(cherry picked from commit 02f2fb8)
  • Loading branch information
catenacyber committed Apr 17, 2024
1 parent 3422764 commit 7e1ab39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rust/src/asn1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub struct Asn1<'a>(Vec<BerObject<'a>>);
enum Asn1DecodeError {
InvalidKeywordParameter,
MaxFrames,
BerError(nom::Err<der_parser::error::BerError>),
BerError,
}

/// Enumeration of Asn1 checks
Expand Down Expand Up @@ -276,8 +276,8 @@ impl From<std::num::TryFromIntError> for Asn1DecodeError {
}

impl From<nom::Err<der_parser::error::BerError>> for Asn1DecodeError {
fn from(e: nom::Err<der_parser::error::BerError>) -> Asn1DecodeError {
Asn1DecodeError::BerError(e)
fn from(_e: nom::Err<der_parser::error::BerError>) -> Asn1DecodeError {
Asn1DecodeError::BerError
}
}

Expand Down

0 comments on commit 7e1ab39

Please sign in to comment.