mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fix clippy not linting logging format args
This commit is contained in:
+3
-3
@@ -390,7 +390,7 @@ impl Game {
|
||||
|
||||
self.cache.set_archive_paths(archive_paths);
|
||||
|
||||
logging::trace!("Starting loading {}s.", load_scope);
|
||||
logging::trace!("Starting loading {load_scope}s.");
|
||||
|
||||
let plugins: Vec<_> = plugin_paths
|
||||
.par_iter()
|
||||
@@ -462,7 +462,7 @@ impl Game {
|
||||
if is_log_enabled(LogLevel::Debug) {
|
||||
logging::debug!("Current load order:");
|
||||
for plugin_name in plugin_names {
|
||||
logging::debug!("\t{}", plugin_name);
|
||||
logging::debug!("\t{plugin_name}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -477,7 +477,7 @@ impl Game {
|
||||
if is_log_enabled(LogLevel::Debug) {
|
||||
logging::debug!("Sorted load order:");
|
||||
for plugin_name in &new_load_order {
|
||||
logging::debug!("\t{}", plugin_name);
|
||||
logging::debug!("\t{plugin_name}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -105,6 +105,7 @@ impl Logger {
|
||||
}
|
||||
}
|
||||
|
||||
#[clippy::format_args]
|
||||
macro_rules! log {
|
||||
($level:expr, $($arg:tt)+) => {
|
||||
// Log using the Rust log crate, as it's probably good to support that.
|
||||
@@ -123,22 +124,27 @@ macro_rules! log {
|
||||
};
|
||||
}
|
||||
|
||||
#[clippy::format_args]
|
||||
macro_rules! error {
|
||||
($($arg:tt)+) => { $crate::logging::log!(crate::LogLevel::Error, $($arg)+) };
|
||||
}
|
||||
|
||||
#[clippy::format_args]
|
||||
macro_rules! warning {
|
||||
($($arg:tt)+) => { $crate::logging::log!(crate::LogLevel::Warning, $($arg)+) };
|
||||
}
|
||||
|
||||
#[clippy::format_args]
|
||||
macro_rules! info {
|
||||
($($arg:tt)+) => { $crate::logging::log!(crate::LogLevel::Info, $($arg)+) };
|
||||
}
|
||||
|
||||
#[clippy::format_args]
|
||||
macro_rules! debug {
|
||||
($($arg:tt)+) => { $crate::logging::log!(crate::LogLevel::Debug, $($arg)+) };
|
||||
}
|
||||
|
||||
#[clippy::format_args]
|
||||
macro_rules! trace {
|
||||
($($arg:tt)+) => { $crate::logging::log!(crate::LogLevel::Trace, $($arg)+) };
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ fn find_node_by_weight(
|
||||
{
|
||||
Ok(n)
|
||||
} else {
|
||||
logging::error!("Can't find group with name {}", weight);
|
||||
logging::error!("Can't find group with name {weight}");
|
||||
Err(UndefinedGroupError::new(weight.to_owned()))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user