mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-12-03 20:21:46 +01:00
clippy
This commit is contained in:
parent
7b33f45e28
commit
c8c82cacc2
@ -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)]
|
||||
|
||||
@ -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<_>>()),
|
||||
)
|
||||
|
||||
@ -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]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user