diff options
| author | bors <bors@rust-lang.org> | 2020-08-06 20:22:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-08-06 20:22:20 +0000 |
| commit | 71f8d0c8f1060bbe74100f29cc6f2da63d697c28 (patch) | |
| tree | 1d39e44a3a36f5bd361a2d20d85c80207e031c5b | |
| parent | 0d75c91def02555b6932c457e63dd999ec58e319 (diff) | |
| parent | 888bc07c6bee3ed96b6f94f83e13a66828858ad4 (diff) | |
Auto merge of #75228 - tmiasko:keep-stdout-open, r=ecstatic-morse
Keep stdout open in limit_vector_count test
| -rw-r--r-- | library/std/src/sys/unix/fd.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/unix/fd.rs b/library/std/src/sys/unix/fd.rs index e36a53084ba..ba169b251b0 100644 --- a/library/std/src/sys/unix/fd.rs +++ b/library/std/src/sys/unix/fd.rs @@ -283,12 +283,12 @@ impl Drop for FileDesc { #[cfg(test)] mod tests { use super::{FileDesc, IoSlice}; + use core::mem::ManuallyDrop; #[test] fn limit_vector_count() { - let stdout = FileDesc { fd: 1 }; + let stdout = ManuallyDrop::new(FileDesc { fd: 1 }); let bufs = (0..1500).map(|_| IoSlice::new(&[])).collect::<Vec<_>>(); - assert!(stdout.write_vectored(&bufs).is_ok()); } } |
