Skip to content

Commit

Permalink
provide correct size hint for unsupported platform CommandArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Aug 6, 2022
1 parent d77da9d commit 725da87
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/std/src/sys/unsupported/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ impl<'a> Iterator for CommandArgs<'a> {
fn next(&mut self) -> Option<&'a OsStr> {
None
}
fn size_hint(&self) -> (usize, Option<usize>) {
(0, Some(0))
}
}

impl<'a> ExactSizeIterator for CommandArgs<'a> {}
Expand Down

0 comments on commit 725da87

Please sign in to comment.