diff options
| author | Simon Sapin <simon.sapin@exyr.org> | 2013-12-23 16:20:52 +0100 |
|---|---|---|
| committer | Simon Sapin <simon.sapin@exyr.org> | 2014-01-21 15:48:47 -0800 |
| commit | bada25e425ae30583ad343e36a034e59c66fcad6 (patch) | |
| tree | 4e07ddbe72ef54075d401322c8283de064f02b4e /src/libstd/io | |
| parent | aa66b91767ce92c45192ca11718575529d631d21 (diff) | |
| download | rust-bada25e425ae30583ad343e36a034e59c66fcad6.tar.gz rust-bada25e425ae30583ad343e36a034e59c66fcad6.zip | |
[std::vec] Rename .pop_opt() to .pop(), drop the old .pop() behavior
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/process.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstd/io/process.rs b/src/libstd/io/process.rs index 4c8a640a849..a0c451647d3 100644 --- a/src/libstd/io/process.rs +++ b/src/libstd/io/process.rs @@ -161,8 +161,11 @@ impl Drop for Process { fn drop(&mut self) { // Close all I/O before exiting to ensure that the child doesn't wait // forever to print some text or something similar. - for _ in range(0, self.io.len()) { - self.io.pop(); + loop { + match self.io.pop() { + Some(_) => (), + None => break, + } } self.wait(); |
