Benjamin Sago před 4 roky
rodič
revize
03ecc9e26e
3 změnil soubory, kde provedl 4 přidání a 3 odebrání
  1. 1 1
      dns/src/record/naptr.rs
  2. 1 0
      src/main.rs
  3. 2 2
      src/output.rs

+ 1 - 1
dns/src/record/naptr.rs

@@ -79,7 +79,7 @@ impl Wire for NAPTR {
 
         let length_after_labels = 2 + 2 +
             1 + u16::from(flags_length) + 1 + u16::from(service_length) +
-            1 + u16::from(regex_length) + u16::from(replacement_length);
+            1 + u16::from(regex_length) + replacement_length;
 
         if stated_length == length_after_labels {
             Ok(Self { order, preference, flags, service, regex, replacement })

+ 1 - 0
src/main.rs

@@ -15,6 +15,7 @@
 #![allow(clippy::enum_glob_use)]
 #![allow(clippy::module_name_repetitions)]
 #![allow(clippy::option_if_let_else)]
+#![allow(clippy::too_many_lines)]
 #![allow(clippy::unit_arg)]
 #![allow(clippy::unused_self)]
 #![allow(clippy::useless_let_if_seq)]

+ 2 - 2
src/output.rs

@@ -252,7 +252,7 @@ impl TextFormat {
                     tlsa.certificate_usage,
                     tlsa.selector,
                     tlsa.matching_type,
-                    tlsa.hex_certificate_data().to_string(),
+                    tlsa.hex_certificate_data(),
                 )
             }
             Record::TXT(ref txt) => {
@@ -463,7 +463,7 @@ fn json_record(record: &Record) -> JsonValue {
                 "certificate_usage": rec.certificate_usage,
                 "selector": rec.selector,
                 "matching_type": rec.matching_type,
-                "certificate_data": rec.hex_certificate_data().to_string(),
+                "certificate_data": rec.hex_certificate_data(),
             })
         }
         Record::TXT(rec) => {