Skip to content

Commit

Permalink
use as_raw_fd directly
Browse files Browse the repository at this point in the history
  • Loading branch information
pacak committed Oct 1, 2021
1 parent f54c060 commit 72009e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/sys/test_socket.rs
Expand Up @@ -78,7 +78,7 @@ pub fn test_timestamping() {
None,
)
.expect("send socket failed");
let sfd = ssock.as_raw_fd();
let sfd = AsRawFd::as_raw_fd(&ssock);

let rsock = socket(
AddressFamily::Inet,
Expand All @@ -88,7 +88,7 @@ pub fn test_timestamping() {
)
.unwrap();
nix::sys::socket::bind(rsock, &sock_addr).unwrap();
let rfd = rsock.as_raw_fd();
let rfd = AsRawFd::as_raw_fd(&rsock);

setsockopt(rfd, Timestamping, &TimestampingFlag::all()).unwrap();

Expand Down

0 comments on commit 72009e2

Please sign in to comment.