Skip to content

Commit 578ed66

Browse files
committed
socket: Fix tests
1 parent 7b9e42e commit 578ed66

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
@@ -820,7 +820,10 @@ mod tests {
820820
#[test]
821821
#[cfg(unix)]
822822
fn socket_messages() {
823-
use std::{io, os::unix::io::AsRawFd};
823+
use std::{
824+
io,
825+
os::unix::io::{AsRawFd, FromRawFd, OwnedFd},
826+
};
824827

825828
use super::Socket;
826829
use crate::{prelude::*, Cancellable, UnixFDMessage};
@@ -832,8 +835,8 @@ mod tests {
832835
panic!("{}", io::Error::last_os_error());
833836
}
834837
(
835-
Socket::from_fd(fds[0]).unwrap(),
836-
Socket::from_fd(fds[1]).unwrap(),
838+
Socket::from_fd(OwnedFd::from_raw_fd(fds[0])).unwrap(),
839+
Socket::from_fd(OwnedFd::from_raw_fd(fds[1])).unwrap(),
837840
)
838841
};
839842

0 commit comments

Comments
 (0)