Skip to content

Commit

Permalink
Benchmarks: Fix unused imports for non-unix targets
Browse files Browse the repository at this point in the history
  • Loading branch information
francis-clairicia committed Jun 20, 2024
1 parent d6e5366 commit ef9b822
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions benchmark_server/src/datagram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ use std::{
io,
net::{ToSocketAddrs, UdpSocket},
ops::{Deref, DerefMut},
path::Path,
time::Duration,
};

#[cfg(unix)]
use std::os::unix::net::UnixDatagram;
use std::{os::unix::net::UnixDatagram, path::Path};

pub trait ConnectedDatagramEndpoint {
fn send(&self, buf: &[u8]) -> io::Result<usize>;
Expand Down
3 changes: 1 addition & 2 deletions benchmark_server/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ use std::{
io::{self, Read, Write},
net::{TcpStream, ToSocketAddrs},
ops::{Deref, DerefMut},
path::Path,
time::Duration,
};

#[cfg(unix)]
use std::os::unix::net::UnixStream;
use std::{os::unix::net::UnixStream, path::Path};

pub trait Stream: Read + Write {
fn set_timeout(&self, timeout: Option<Duration>) -> io::Result<()>;
Expand Down

0 comments on commit ef9b822

Please sign in to comment.