]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: fix clippy 1.77 warning
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 21 Mar 2024 15:02:23 +0000 (16:02 +0100)
committerPhilippe Antoine <pantoine@oisf.net>
Thu, 21 Mar 2024 21:33:26 +0000 (22:33 +0100)
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 02f2fb88333af767ab3b171643357d607f4e86f6)

rust/src/asn1/mod.rs

index 4b77b0ca28d51e560c955f990d33cf41e7ae5f2a..7496d44488105a485f596619d94e9c40ad6a7436 100644 (file)
@@ -33,7 +33,7 @@ pub struct Asn1<'a>(Vec<BerObject<'a>>);
 enum Asn1DecodeError {
     InvalidKeywordParameter,
     MaxFrames,
-    BerError(Err<der_parser::error::BerError>),
+    BerError,
 }
 
 /// Enumeration of Asn1 checks
@@ -282,8 +282,8 @@ impl From<std::num::TryFromIntError> for Asn1DecodeError {
 }
 
 impl From<Err<der_parser::error::BerError>> for Asn1DecodeError {
-    fn from(e: Err<der_parser::error::BerError>) -> Asn1DecodeError {
-        Asn1DecodeError::BerError(e)
+    fn from(_e: Err<der_parser::error::BerError>) -> Asn1DecodeError {
+        Asn1DecodeError::BerError
     }
 }