Skip to content

Commit 71f8d0c

Browse files
committed
Auto merge of #75228 - tmiasko:keep-stdout-open, r=ecstatic-morse
Keep stdout open in limit_vector_count test
2 parents 0d75c91 + 888bc07 commit 71f8d0c

File tree

1 file changed

+2
-2
lines changed
  • library/std/src/sys/unix

1 file changed

+2
-2
lines changed

library/std/src/sys/unix/fd.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,12 @@ impl Drop for FileDesc {
283283
#[cfg(test)]
284284
mod tests {
285285
use super::{FileDesc, IoSlice};
286+
use core::mem::ManuallyDrop;
286287

287288
#[test]
288289
fn limit_vector_count() {
289-
let stdout = FileDesc { fd: 1 };
290+
let stdout = ManuallyDrop::new(FileDesc { fd: 1 });
290291
let bufs = (0..1500).map(|_| IoSlice::new(&[])).collect::<Vec<_>>();
291-
292292
assert!(stdout.write_vectored(&bufs).is_ok());
293293
}
294294
}

0 commit comments

Comments
 (0)