clippy: fix all warnings across all binaries
- &PathBuf → &Path in memory-search.rs signatures - Redundant field name in graph.rs struct init - Add truncate(false) to lock file open - Derive Default for Store instead of manual impl - slice::from_ref instead of &[x.clone()] - rsplit_once instead of split().last() - str::repeat instead of iter::repeat().take().collect() - is_none_or instead of map_or(true, ...) - strip_prefix instead of manual slicing Zero warnings on `cargo clippy`.
This commit is contained in:
parent
7ee6f9c651
commit
29d5ed47a1
5 changed files with 15 additions and 27 deletions
|
|
@ -275,7 +275,7 @@ fn format_health_section(store: &Store, graph: &Graph) -> String {
|
|||
for (i, &count) in buckets.iter().enumerate() {
|
||||
let lo = i as f32 / 10.0;
|
||||
let hi = (i + 1) as f32 / 10.0;
|
||||
let bar: String = std::iter::repeat('█').take((count as usize) / 10).collect();
|
||||
let bar = "█".repeat((count as usize) / 10);
|
||||
out.push_str(&format!(" {:.1}-{:.1}: {:4} {}\n", lo, hi, count, bar));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue