Fix port to nix 0.29

epel10
Fabio Valentini 4 months ago
parent a3ac596df5
commit 749ee2fa8c
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

@ -1,33 +1,32 @@
From b940f15dc2ba522fb2bcf40f276045ff7a92d0d2 Mon Sep 17 00:00:00 2001
From 272e1ce7a34961d2c71b06f5a50a1f6671ffb236 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Thu, 24 Oct 2024 00:00:09 +0200
Date: Thu, 24 Oct 2024 00:44:18 +0200
Subject: [PATCH] port from nix 0.26 to 0.29
---
tests/integration_tests.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
tests/integration_tests.rs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs
index 8d2d362..2be33d9 100644
index 8d2d362..267178b 100644
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -9,7 +9,7 @@ use tempfile::tempdir;
@@ -9,7 +9,6 @@ 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() {
@@ -307,8 +306,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 mut master = File::from(master);
+ let stdin_file = File::from(slave);
let stdout_file = stdin_file.try_clone().unwrap();
let stdin = Stdio::from(stdin_file);
let stdout = Stdio::from(stdout_file);

Loading…
Cancel
Save