Fix ALL clippy warnings

This commit is contained in:
Devin Ragotzy 2021-01-15 11:05:57 -05:00 committed by Devin Ragotzy
parent 4cf530c55b
commit 4b2eb5ab82
12 changed files with 106 additions and 282 deletions

View file

@ -121,10 +121,12 @@ impl log::Log for ConduitLogger {
fn log(&self, record: &log::Record<'_>) {
let output = format!("{} - {}", record.level(), record.args());
let match_mod_path =
|path: &str| path.starts_with("conduit::") || path.starts_with("state");
if self.enabled(record.metadata())
&& (record.module_path().map_or(false, |path| {
path.starts_with("conduit::") || path.starts_with("state")
}) || record
&& (record.module_path().map_or(false, match_mod_path)
|| record
.module_path()
.map_or(true, |path| !path.starts_with("rocket::")) // Rockets logs are annoying
&& record.metadata().level() <= log::Level::Warn)