redbear-hwutils: fix misplaced 'use log;' in 3 phase-check bins

The eprintln!->log/env_logger conversion in redbear-phase{2-wayland,3-kwin,
4-kde}-check inserted 'use log;' INSIDE the 'use std::{ ... }' block, producing
'expected identifier, found keyword use' / 'unresolved imports std::r#use,
std::log' -> redbear-hwutils failed to cook. log::/env_logger:: are called by
full path (and log/env_logger are already deps), so the import is redundant;
removed the three stray lines. All hwutils bins compile.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-28 16:46:58 +09:00
parent 85feac909b
commit 92ad3ee166
3 changed files with 9 additions and 6 deletions
@@ -207,7 +207,7 @@ impl Report {
};
if let Err(err) = serde_json::to_writer(std::io::stdout(), &report) {
eprintln!("{PROGRAM}: failed to serialize JSON: {err}");
log::error!("{PROGRAM}: failed to serialize JSON: {err}");
}
}
}
@@ -569,11 +569,12 @@ fn run() -> Result<(), String> {
}
fn main() {
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init();
if let Err(err) = run() {
if err.is_empty() {
process::exit(0);
}
eprintln!("{PROGRAM}: {err}");
log::error!("{PROGRAM}: {err}");
process::exit(1);
}
}
@@ -185,7 +185,7 @@ impl Report {
};
if let Err(err) = serde_json::to_writer(std::io::stdout(), &report) {
eprintln!("{PROGRAM}: failed to serialize JSON: {err}");
log::error!("{PROGRAM}: failed to serialize JSON: {err}");
}
}
}
@@ -464,11 +464,12 @@ fn run() -> Result<(), String> {
}
fn main() {
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init();
if let Err(err) = run() {
if err.is_empty() {
process::exit(0);
}
eprintln!("{PROGRAM}: {err}");
log::error!("{PROGRAM}: {err}");
process::exit(1);
}
}
@@ -187,7 +187,7 @@ impl Report {
};
if let Err(err) = serde_json::to_writer(std::io::stdout(), &report) {
eprintln!("{PROGRAM}: failed to serialize JSON: {err}");
log::error!("{PROGRAM}: failed to serialize JSON: {err}");
}
}
}
@@ -743,11 +743,12 @@ fn run() -> Result<(), String> {
}
fn main() {
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init();
if let Err(err) = run() {
if err.is_empty() {
process::exit(0);
}
eprintln!("{PROGRAM}: {err}");
log::error!("{PROGRAM}: {err}");
process::exit(1);
}
}