]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Eliminate some code duplication.
authorKevin P. Fleming <kevin@km6g.us>
Sun, 6 Jul 2025 15:54:45 +0000 (11:54 -0400)
committerKevin P. Fleming <kevin@km6g.us>
Mon, 7 Jul 2025 10:15:51 +0000 (06:15 -0400)
contrib/pblogger-rs/src/display.rs

index c8fb08d20ac59c801c061d73471fcc1c0cc374b9..80550408a95e5eeb79199ca3d4c4df29b495e40f 100644 (file)
@@ -316,14 +316,12 @@ impl fmt::Display for ClientMessage {
         match self.msg.r#type() {
             pbdns_message::Type::DnsQueryType | pbdns_message::Type::DnsIncomingResponseType => {
                 print_summary(self, Direction::In, f)?;
-                print_meta(self, f)?;
-                print_query(self, f)
             }
             pbdns_message::Type::DnsResponseType | pbdns_message::Type::DnsOutgoingQueryType => {
                 print_summary(self, Direction::Out, f)?;
-                print_meta(self, f)?;
-                print_query(self, f)
             }
         }
+        print_meta(self, f)?;
+        print_query(self, f)
     }
 }