feat: Disable Unix socket on non-unix platforms

This commit is contained in:
Mark Stopka 2021-12-15 02:43:27 +01:00
parent d04582253a
commit 1cc332188e

View file

@ -1,6 +1,7 @@
use byteorder::{ByteOrder, NetworkEndian, WriteBytesExt};
use log::{debug, log_enabled, trace};
use std::io::{Read, Write};
#[cfg(target_family = "unix")]
use std::os::unix::net::UnixStream;
use std::{net::TcpStream, time::Instant};
@ -78,6 +79,7 @@ impl Bearer for TcpStream {
}
}
#[cfg(target_family = "unix")]
impl Bearer for UnixStream {
fn clone(&self) -> Self {
self.try_clone().unwrap()