Skip to content

Commit 25264db

Browse files
committed
socket: Fix tests
1 parent 0e306d3 commit 25264db

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

gio/src/socket.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,10 @@ mod tests {
819819
#[test]
820820
#[cfg(unix)]
821821
fn socket_messages() {
822-
use std::{io, os::unix::io::AsRawFd};
822+
use std::{
823+
io,
824+
os::unix::io::{AsRawFd, FromRawFd, OwnedFd},
825+
};
823826

824827
use super::Socket;
825828
use crate::{prelude::*, Cancellable, UnixFDMessage};
@@ -831,8 +834,8 @@ mod tests {
831834
panic!("{}", io::Error::last_os_error());
832835
}
833836
(
834-
Socket::from_fd(fds[0]).unwrap(),
835-
Socket::from_fd(fds[1]).unwrap(),
837+
Socket::from_fd(OwnedFd::from_raw_fd(fds[0])).unwrap(),
838+
Socket::from_fd(OwnedFd::from_raw_fd(fds[1])).unwrap(),
836839
)
837840
};
838841

0 commit comments

Comments
 (0)