From b940f15dc2ba522fb2bcf40f276045ff7a92d0d2 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Thu, 24 Oct 2024 00:00:09 +0200 Subject: [PATCH] port from nix 0.26 to 0.29 --- tests/integration_tests.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 8d2d362..2be33d9 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -9,7 +9,7 @@ use tempfile::tempdir; mod unix { pub use std::fs::File; pub use std::io::{self, Write}; - pub use std::os::unix::io::FromRawFd; + pub use std::os::unix::io::{AsRawFd, FromRawFd}; pub use std::path::PathBuf; pub use std::process::Stdio; pub use std::thread; @@ -307,8 +307,8 @@ fn no_args_doesnt_break() { // not exit, because in this case it is safe to read and write to the same fd, which is why // this test exists. let OpenptyResult { master, slave } = openpty(None, None).expect("Couldn't open pty."); - let mut master = unsafe { File::from_raw_fd(master) }; - let stdin_file = unsafe { File::from_raw_fd(slave) }; + let mut master = unsafe { File::from_raw_fd(master.as_raw_fd()) }; + let stdin_file = unsafe { File::from_raw_fd(slave.as_raw_fd()) }; let stdout_file = stdin_file.try_clone().unwrap(); let stdin = Stdio::from(stdin_file); let stdout = Stdio::from(stdout_file); -- 2.47.0