about summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-08-11 22:53:04 +0200
committerGitHub <noreply@github.com>2022-08-11 22:53:04 +0200
commitbd64d67d11ce62ec5242d86ae9efade49f084f70 (patch)
tree69a55bcb56bd4a37aaa2a80a78d309f2fefb7909 /library/std/src/sys
parent275d4e779a3bea8b6d1bbe895d14c31e0afb6c5d (diff)
parent725da8787610e3ccdcdac179f90157aaff2a49a8 (diff)
downloadrust-bd64d67d11ce62ec5242d86ae9efade49f084f70.tar.gz
rust-bd64d67d11ce62ec5242d86ae9efade49f084f70.zip
Rollup merge of #100203 - compiler-errors:command-args-size-hint, r=m-ou-se
provide correct size hint for unsupported platform `CommandArgs`

Split from https://github.com/rust-lang/rust/pull/99880#discussion_r932994172
Diffstat (limited to 'library/std/src/sys')
-rw-r--r--library/std/src/sys/unsupported/process.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/std/src/sys/unsupported/process.rs b/library/std/src/sys/unsupported/process.rs
index 42a1ff730e3..633f17c054b 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<usize>) {
+        (0, Some(0))
+    }
 }
 
 impl<'a> ExactSizeIterator for CommandArgs<'a> {}