fix: resolve clippy warnings (matches!, map_or, redundant guard, unnecessary allocations)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user