]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: fix clippy lint for borrow_deref_ref
authorJason Ish <jason.ish@oisf.net>
Mon, 3 Oct 2022 21:28:50 +0000 (15:28 -0600)
committerVictor Julien <vjulien@oisf.net>
Tue, 4 Oct 2022 09:22:02 +0000 (11:22 +0200)
This type of borrow then reference has no effect.

rust/src/krb/detect.rs

index cde061ed3a3222ce69ae2f7da324bee5226c7f5a..7f408088eae5c1e66c1d210b7bd6ee27194cdc00 100644 (file)
@@ -121,7 +121,7 @@ trait MyFromStr {
 
 impl MyFromStr for EncryptionType {
     fn from_str(s: &str) -> Result<Self, String> {
-        let su_slice: &str = &*s;
+        let su_slice: &str = s;
         match su_slice {
             "des-cbc-crc" => Ok(EncryptionType::DES_CBC_CRC),
             "des-cbc-md4" => Ok(EncryptionType::DES_CBC_MD4),