From 7044a928586a37bd9989c0e895b2d9a2a9a8a8a0 Mon Sep 17 00:00:00 2001 From: Austin Bonander Date: Fri, 5 Jan 2024 19:05:16 -0800 Subject: [PATCH] fix: fix new warnings that cropped up --- sqlx-core/src/net/socket/mod.rs | 4 +++- sqlx-postgres/src/message/mod.rs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sqlx-core/src/net/socket/mod.rs b/sqlx-core/src/net/socket/mod.rs index f11c10dedd..076aa9a3e3 100644 --- a/sqlx-core/src/net/socket/mod.rs +++ b/sqlx-core/src/net/socket/mod.rs @@ -244,6 +244,8 @@ pub async fn connect_uds, Ws: WithSocket>( ) -> crate::Result { #[cfg(not(unix))] { + drop((path, with_socket)); + return Err(io::Error::new( io::ErrorKind::Unsupported, "Unix domain sockets are not supported on this platform", @@ -270,7 +272,7 @@ pub async fn connect_uds, Ws: WithSocket>( return Ok(with_socket.with_socket(stream)); } - #[cfg(not(feature = "_rt-async-std"))] + #[cfg(all(unix, not(feature = "_rt-async-std")))] { crate::rt::missing_rt((path, with_socket)) } diff --git a/sqlx-postgres/src/message/mod.rs b/sqlx-postgres/src/message/mod.rs index 6e7daad239..ef1dbfabf0 100644 --- a/sqlx-postgres/src/message/mod.rs +++ b/sqlx-postgres/src/message/mod.rs @@ -37,6 +37,7 @@ pub use copy::{CopyData, CopyDone, CopyFail, CopyResponse}; pub use data_row::DataRow; pub use describe::Describe; pub use execute::Execute; +#[allow(unused_imports)] pub use flush::Flush; pub use notification::Notification; pub use parameter_description::ParameterDescription;