]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Reformat and add clippy comment
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 3 Feb 2025 10:40:07 +0000 (11:40 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 11 Feb 2025 15:28:22 +0000 (16:28 +0100)
pdns/recursordist/settings/cxxsupport.cc
pdns/recursordist/settings/rust/src/bridge.hh
pdns/recursordist/settings/rust/src/bridge.rs
pdns/recursordist/settings/rust/src/misc.rs
pdns/recursordist/settings/rust/src/web.rs

index e41ba09db502ed0b3f2504a9a324066abd07f92e..ea27ea26e1998c6c75ccd3bfe6d2ef22f2ec8ef4 100644 (file)
@@ -1492,7 +1492,7 @@ bool matches(const std::unique_ptr<NetmaskGroup>& nmg, const std::unique_ptr<Com
   return nmg->get().match(address->get());
 }
 
-  void log(const std::shared_ptr<Logger>& logger, pdns::rust::misc::Priority log_level, ::rust::Str msg, const ::rust::Vec<KeyValue>& values)
+void log(const std::shared_ptr<Logger>& logger, pdns::rust::misc::Priority log_level, ::rust::Str msg, const ::rust::Vec<KeyValue>& values)
 {
   auto log = logger;
   for (const auto& [key, value] : values) {
@@ -1501,7 +1501,7 @@ bool matches(const std::unique_ptr<NetmaskGroup>& nmg, const std::unique_ptr<Com
   log->info(static_cast<Logr::Priority>(log_level), std::string(msg));
 }
 
-  void error(const std::shared_ptr<Logger>& logger, pdns::rust::misc::Priority log_level, ::rust::Str error, ::rust::Str msg, const ::rust::Vec<KeyValue>& values)
+void error(const std::shared_ptr<Logger>& logger, pdns::rust::misc::Priority log_level, ::rust::Str error, ::rust::Str msg, const ::rust::Vec<KeyValue>& values)
 {
   auto log = logger;
   for (const auto& [key, value] : values) {
index 5afe3ef37ae29a4b3feacfe19de20383c79ba55b..c716fdd90679511a2934838706148bd39f3b523d 100644 (file)
@@ -33,7 +33,8 @@ namespace Logr
 class Logger;
 }
 
-namespace pdns::rust::misc {
+namespace pdns::rust::misc
+{
 enum class Priority : uint8_t;
 enum class LogLevel : uint8_t;
 using Logger = ::Logr::Logger;
@@ -70,7 +71,6 @@ void log(const std::shared_ptr<Logger>& logger, Priority log_level, ::rust::Str
 void error(const std::shared_ptr<Logger>& logger, Priority log_level, ::rust::Str err, ::rust::Str msg, const ::rust::Vec<KeyValue>& values);
 }
 
-
 namespace pdns::rust::web::rec
 {
 using CredentialsHolder = ::CredentialsHolder;
index 701bdc4f993077f92671c473d26e24d0382ab915..4167b9758db141c54ce48ffeb15d1de659454051 100644 (file)
@@ -29,9 +29,9 @@ use std::str::FromStr;
 use std::sync::Mutex;
 
 use crate::helpers::OVERRIDE_TAG;
+use crate::misc::rustmisc;
 use crate::recsettings::{self, *};
 use crate::{Merge, ValidationError};
-use crate::misc::rustmisc;
 
 impl Default for ForwardZone {
     fn default() -> Self {
index 87118cbf9399337960cdccb038e755a962aef4e0..f3999afa0abcf0dfc74584f315a0c0fbd49a0681 100644 (file)
@@ -42,6 +42,5 @@ pub mod rustmisc {
             msg: &str,
             values: &Vec<KeyValue>,
         );
-   }
+    }
 }
-
index fa95835a54bb6c54874cfb7105429916aa57fc29..e9a394d5a4a35cd8deb525b19cc53f7898c69be3 100644 (file)
@@ -1058,6 +1058,8 @@ mod rustweb {
         value: String,
     }
 
+    // Clippy does not seem to understand what cxx does and complains about needless_lifetimes
+    // I was unable to silence that warning
     struct Request<'a> {
         body: Vec<u8>,
         uri: String,