Skip to content

Commit

Permalink
Reformat and add clippy comment
Browse files Browse the repository at this point in the history
  • Loading branch information
omoerbeek committed Feb 3, 2025
1 parent 38d5e3e commit 71acf60
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pdns/recursordist/settings/cxxsupport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions pdns/recursordist/settings/rust/src/bridge.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion pdns/recursordist/settings/rust/src/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions pdns/recursordist/settings/rust/src/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,5 @@ pub mod rustmisc {
msg: &str,
values: &Vec<KeyValue>,
);
}
}
}

2 changes: 2 additions & 0 deletions pdns/recursordist/settings/rust/src/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 71acf60

Please sign in to comment.