Skip to content

Commit bdaf7a8

Browse files
committed
Use split_whitespace() when filtering lines in the ps output
1 parent 6c4cf30 commit bdaf7a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/ui/wait-forked-but-failed-child.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn find_zombies() {
3838
// expected to be an integer.
3939
let filtered_ps: Vec<_> = ps_output
4040
.lines()
41-
.filter(|line| line.split(' ').filter(|x| 0 < x.len()).nth(1) != Some("-"))
41+
.filter(|line| line.split_whitespace().nth(1) != Some("-"))
4242
.collect();
4343

4444
for (line_no, line) in filtered_ps.into_iter().enumerate() {

0 commit comments

Comments
 (0)