diff options
| author | Amy Kwan <amy.kwan1@ibm.com> | 2025-02-06 15:05:53 -0500 |
|---|---|---|
| committer | Amy Kwan <amy.kwan1@ibm.com> | 2025-02-06 15:05:53 -0500 |
| commit | bdaf7a8fd7b3c670a6a5c506e065fa032432b401 (patch) | |
| tree | c1c4e3132a62e56a52ad742cfb4c2e02969fadab | |
| parent | 6c4cf30009bd0cad81202fbcc2e835bc66b14e74 (diff) | |
Use split_whitespace() when filtering lines in the ps output
| -rw-r--r-- | tests/ui/wait-forked-but-failed-child.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/wait-forked-but-failed-child.rs b/tests/ui/wait-forked-but-failed-child.rs index d756e6515b7..4a7f2bee9d9 100644 --- a/tests/ui/wait-forked-but-failed-child.rs +++ b/tests/ui/wait-forked-but-failed-child.rs @@ -38,7 +38,7 @@ fn find_zombies() { // expected to be an integer. let filtered_ps: Vec<_> = ps_output .lines() - .filter(|line| line.split(' ').filter(|x| 0 < x.len()).nth(1) != Some("-")) + .filter(|line| line.split_whitespace().nth(1) != Some("-")) .collect(); for (line_no, line) in filtered_ps.into_iter().enumerate() { |
