From 725da8787610e3ccdcdac179f90157aaff2a49a8 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Fri, 29 Jul 2022 00:17:24 +0000 Subject: [PATCH] provide correct size hint for unsupported platform CommandArgs --- library/std/src/sys/unsupported/process.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/std/src/sys/unsupported/process.rs b/library/std/src/sys/unsupported/process.rs index 42a1ff730e379..633f17c054bc6 100644 --- a/library/std/src/sys/unsupported/process.rs +++ b/library/std/src/sys/unsupported/process.rs @@ -200,6 +200,9 @@ impl<'a> Iterator for CommandArgs<'a> { fn next(&mut self) -> Option<&'a OsStr> { None } + fn size_hint(&self) -> (usize, Option) { + (0, Some(0)) + } } impl<'a> ExactSizeIterator for CommandArgs<'a> {}