`decoder`: Satisfy clippy
@@ -19,8 +19,7 @@ impl Log for JsonLogger {
return;
}
- match DefmtRecord::new(record) {
- Some(record) => {
+ if let Some(record) = DefmtRecord::new(record) {
let (krate, modules, function) = extract_path(record.module_path());
let level = match record.is_println() {
false => record.level().as_str(),
@@ -53,9 +52,8 @@ impl Log for JsonLogger {
}),
)
.ok();
- writeln!(sink, "").ok();
- }
- None => { /* TODO: handle host logs */ }
+ writeln!(sink).ok();
+ } else { /* TODO: handle host logs */
}
}
@@ -79,7 +77,7 @@ fn extract_path(module_path: Option<&str>) -> (String, Vec<String>, String) {
let krate = module_path[..1][0].to_string();
let modules = module_path[1..idx]
- .into_iter()
+ .iter()
.map(|b| b.to_string())
.collect::<Vec<_>>();
let function = module_path[idx..][0].to_string();
