watchman_client: fix windows build

Summary:
The watchman_client crate relied on unix-only crates for both
unix_socket_transport and command_line_transport. Let's not compile
these on windows.

Reviewed By: quark-zju

Differential Revision: D14174654

fbshipit-source-id: 67d26d1799e71a1bf20af1a57a687249f5dce227
This commit is contained in:
Xavier Deguillard 2019-02-22 10:10:34 -08:00 committed by Facebook Github Bot
parent ee8c0812fd
commit 9f05c94729

View File

@ -38,6 +38,7 @@ pub trait Transport {
/// Implementations:
#[cfg(unix)]
pub mod unix_socket_transport {
/// local unix domain socket transport */
use self::command_line_transport::CommandLineTransport;
@ -91,7 +92,8 @@ pub mod unix_socket_transport {
return Err(ErrorKind::UnixSocketTransportError(
"get_sock_name",
"can't get sockname".into(),
).into());
)
.into());
}
}
match self.sockname {
@ -167,6 +169,7 @@ pub mod unix_socket_transport {
}
}
#[cfg(unix)]
pub mod command_line_transport {
/// command line transport, required installed watchman client
use std::process::{Command, Stdio};