This commit is contained in:
Steven Fackler 2015-07-04 15:36:34 -07:00
parent 03ee761108
commit 57d91d6b61

View File

@ -112,8 +112,7 @@ fn open_socket(params: &ConnectParams) -> Result<InternalStream, ConnectError> {
} }
#[cfg(feature = "unix_socket")] #[cfg(feature = "unix_socket")]
ConnectTarget::Unix(ref path) => { ConnectTarget::Unix(ref path) => {
let mut path = path.clone(); let path = path.join(&format!(".s.PGSQL.{}", port));
path.push(&format!(".s.PGSQL.{}", port));
Ok(try!(UnixStream::connect(&path).map(InternalStream::Unix))) Ok(try!(UnixStream::connect(&path).map(InternalStream::Unix)))
} }
} }