From d6fd28d02f2001cb77232710901eb9c13c51a60d Mon Sep 17 00:00:00 2001 From: Michael Niens Date: Sun, 26 Aug 2018 00:06:42 +0200 Subject: [PATCH] Allow to build on Windows Someone forgot to handle the non unix case for this match which prevented a build on windows. A similar line already existed here in line 51 to 56. https://github.com/sfackler/rust-postgres/blob/5ad78500095c0a9a59533b9164f46edd23cb9e1b/tokio-postgres/src/stream.rs --- tokio-postgres/src/proto/connect.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tokio-postgres/src/proto/connect.rs b/tokio-postgres/src/proto/connect.rs index 3e74b468d..00da8117e 100644 --- a/tokio-postgres/src/proto/connect.rs +++ b/tokio-postgres/src/proto/connect.rs @@ -110,7 +110,14 @@ impl PollConnect for Connect { params: state.params, tls: state.tls, }) - } + }, + #[cfg(not(unix))] + Host::Unix(_) => { + Err(Error::connect(io::Error::new( + io::ErrorKind::Other, + "unix sockets are not supported on this platform", + ))) + }, } }