This commit is contained in:
Clement Tsang 2025-08-06 01:07:25 -04:00
parent 7b33f45e28
commit c8c82cacc2
3 changed files with 5 additions and 10 deletions

View File

@ -196,13 +196,11 @@ fn create_dataset(data: GraphData<'_>) -> Dataset<'_> {
.data(time, values)
.graph_type(GraphType::Line);
let dataset = if let Some(name) = name {
if let Some(name) = name {
dataset.name(name)
} else {
dataset
};
dataset
}
}
#[cfg(test)]

View File

@ -259,8 +259,7 @@ impl Painter {
f.render_widget(
Table::new(
total_network,
&((std::iter::repeat(draw_loc.width.saturating_sub(2) / 4))
.take(4)
&((std::iter::repeat_n(draw_loc.width.saturating_sub(2) / 4, 4))
.map(Constraint::Length)
.collect::<Vec<_>>()),
)

View File

@ -748,13 +748,11 @@ fn get_default_cpu_selection(args: &BottomArgs, config: &Config) -> config::cpu:
}
fn get_dedicated_avg_row(config: &Config) -> bool {
let conf = config
config
.flags
.as_ref()
.and_then(|flags| flags.average_cpu_row)
.unwrap_or(false);
conf
.unwrap_or(false)
}
#[inline]