From 92ad3ee166f960635f464391fb7df3e9442a37b2 Mon Sep 17 00:00:00 2001 From: vasilito Date: Tue, 28 Jul 2026 16:46:58 +0900 Subject: [PATCH] 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) --- .../source/src/bin/redbear-phase2-wayland-check.rs | 5 +++-- .../source/src/bin/redbear-phase3-kwin-check.rs | 5 +++-- .../source/src/bin/redbear-phase4-kde-check.rs | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase2-wayland-check.rs b/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase2-wayland-check.rs index f48ead181b..a6a794feaa 100644 --- a/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase2-wayland-check.rs +++ b/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase2-wayland-check.rs @@ -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); } } diff --git a/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase3-kwin-check.rs b/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase3-kwin-check.rs index 4d3d45e189..18652114fa 100644 --- a/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase3-kwin-check.rs +++ b/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase3-kwin-check.rs @@ -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); } } diff --git a/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase4-kde-check.rs b/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase4-kde-check.rs index 17b6cc5e4d..267b93e78d 100644 --- a/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase4-kde-check.rs +++ b/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase4-kde-check.rs @@ -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); } }