fix: resolve clippy warnings (matches!, map_or, redundant guard, unnecessary allocations)

This commit is contained in:
Nikketryhard
2026-02-14 04:06:18 -06:00
parent 725bdb4e9a
commit 901cd3d2e3
7 changed files with 14 additions and 32 deletions

View File

@@ -102,12 +102,11 @@ impl Snapshot {
}
// LS process logs
if line.starts_with('I') || line.starts_with('W') || line.starts_with('E') {
if line.len() > 4 && line.chars().nth(1).map_or(false, |c| c.is_ascii_digit()) {
if (line.starts_with('I') || line.starts_with('W') || line.starts_with('E'))
&& line.len() > 4 && line.chars().nth(1).is_some_and(|c| c.is_ascii_digit()) {
snap.ls_logs.push(line.to_string());
continue;
}
}
if line.contains("maxprocs:") {
snap.ls_logs.push(line.to_string());
continue;