Skip to content

Commit

Permalink
reinstate unix flag
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega committed Dec 20, 2023
1 parent 97c16e4 commit f5fbeec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pallas-network/src/facades.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
use std::net::{SocketAddr, TcpListener};
use std::os::unix::net::UnixListener;
use std::path::Path;

Check warning on line 2 in pallas-network/src/facades.rs

View workflow job for this annotation

GitHub Actions / Check (windows-latest, stable)

unused import: `std::path::Path`
use thiserror::Error;
use tracing::error;

#[cfg(unix)]
use std::os::unix::net::UnixListener;

use crate::miniprotocols::handshake::{n2c, n2n, Confirmation, VersionNumber};

Check warning on line 9 in pallas-network/src/facades.rs

View workflow job for this annotation

GitHub Actions / Check (windows-latest, stable)

unused imports: `Confirmation`, `VersionNumber`, `n2c`

use crate::miniprotocols::{
Expand Down Expand Up @@ -224,6 +226,7 @@ impl NodeClient {
}
}

#[cfg(unix)]
pub async fn connect(
path: impl AsRef<Path> + Send + 'static,
magic: u64,
Expand Down
4 changes: 4 additions & 0 deletions pallas-network/src/multiplexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ impl Bearer {
let y = x.try_clone().unwrap();
(BearerReadHalf::Tcp(x), BearerWriteHalf::Tcp(y))
}

#[cfg(unix)]
Bearer::Unix(x) => {
let y = x.try_clone().unwrap();
(BearerReadHalf::Unix(x), BearerWriteHalf::Unix(y))
Expand All @@ -146,6 +148,8 @@ impl BearerReadHalf {
fn read_exact(&mut self, buf: &mut [u8]) -> IOResult<()> {
match self {
BearerReadHalf::Tcp(x) => x.read_exact(buf),

#[cfg(unix)]
BearerReadHalf::Unix(x) => x.read_exact(buf),
}
}
Expand Down

0 comments on commit f5fbeec

Please sign in to comment.