Skip to content

Commit

Permalink
Auto merge of #75228 - tmiasko:keep-stdout-open, r=ecstatic-morse
Browse files Browse the repository at this point in the history
Keep stdout open in limit_vector_count test
  • Loading branch information
bors committed Aug 6, 2020
2 parents 0d75c91 + 888bc07 commit 71f8d0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/std/src/sys/unix/fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

0 comments on commit 71f8d0c

Please sign in to comment.