diff --git a/rom/src/cli.rs b/rom/src/cli.rs index b0c5a70..98ecaef 100644 --- a/rom/src/cli.rs +++ b/rom/src/cli.rs @@ -254,7 +254,8 @@ pub fn run() -> eyre::Result<()> { /// /// Everything before `--` is for the package name and rom arguments. /// Everything after `--` goes directly to nix. -#[must_use] pub fn parse_args_with_separator( +#[must_use] +pub fn parse_args_with_separator( args: &[String], ) -> (Vec, Vec) { if let Some(pos) = args.iter().position(|arg| arg == "--") { @@ -582,9 +583,7 @@ fn run_monitored_command( || !state.full_summary.planned_builds.is_empty(); if !silent { - if has_activity - || state.progress_state != ProgressState::JustStarted - { + if has_activity || state.progress_state != ProgressState::JustStarted { // Clear any previous timer display if last_timer_display.is_some() { display.clear_previous().ok(); diff --git a/rom/src/display.rs b/rom/src/display.rs index ac07178..6def649 100644 --- a/rom/src/display.rs +++ b/rom/src/display.rs @@ -14,7 +14,8 @@ use crossterm::{ use crate::state::{BuildStatus, DerivationId, State, current_time}; /// Format a duration in seconds to a human-readable string -#[must_use] pub fn format_duration(secs: f64) -> String { +#[must_use] +pub fn format_duration(secs: f64) -> String { if secs < 60.0 { format!("{secs:.0}s") } else if secs < 3600.0 { @@ -63,9 +64,9 @@ impl Default for DisplayConfig { } pub struct Display { - writer: W, - config: DisplayConfig, - last_lines: usize, + writer: W, + config: DisplayConfig, + last_lines: usize, } struct TreeNode { @@ -860,8 +861,6 @@ impl Display { lines } - - fn build_active_forest( &self, state: &State, diff --git a/rom/src/types.rs b/rom/src/types.rs index 7358e86..b355ec9 100644 --- a/rom/src/types.rs +++ b/rom/src/types.rs @@ -23,7 +23,8 @@ pub enum SummaryStyle { } impl SummaryStyle { - #[must_use] pub fn from_str(s: &str) -> Self { + #[must_use] + pub fn from_str(s: &str) -> Self { match s.to_lowercase().as_str() { "concise" => Self::Concise, "table" => Self::Table, @@ -34,7 +35,8 @@ impl SummaryStyle { } impl DisplayFormat { - #[must_use] pub fn from_str(s: &str) -> Self { + #[must_use] + pub fn from_str(s: &str) -> Self { match s.to_lowercase().as_str() { "tree" => Self::Tree, "plain" => Self::Plain,