diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2020-08-06 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2020-08-06 00:00:00 +0000 |
| commit | 888bc07c6bee3ed96b6f94f83e13a66828858ad4 (patch) | |
| tree | de75fc7dae8a9e8219c328c355d1275499b6ab43 /library/std/src/sys | |
| parent | c15bae53b5c40db2682211836f892a5a44065e10 (diff) | |
| download | rust-888bc07c6bee3ed96b6f94f83e13a66828858ad4.tar.gz rust-888bc07c6bee3ed96b6f94f83e13a66828858ad4.zip | |
Keep stdout open in limit_vector_count test
Diffstat (limited to 'library/std/src/sys')
| -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()); } } |
