Skip to content

Commit

Permalink
Merge pull request #473 from JakeRoggenbuck/stop-looping-after-last-cpu
Browse files Browse the repository at this point in the history
Stop looping after last cpu in proc file
  • Loading branch information
JakeRoggenbuck authored Nov 16, 2022
2 parents b9cd4ef + aa9c162 commit 171cc89
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ pub fn parse_proc_file(proc: String) -> Result<Vec<ProcStat>, Error> {
Err(_) => {}
}
procs.push(proc_struct);
} else {
// Leave after lines are not prefixed with cpu
break;
}
}
Ok(procs)
Expand Down

0 comments on commit 171cc89

Please sign in to comment.