Skip to content

Commit aef441b

Browse files
Sqlx-core: fix of unix socket build
1 parent 375b493 commit aef441b

File tree

1 file changed

+3
-2
lines changed
  • sqlx-core/src/net/socket

1 file changed

+3
-2
lines changed

sqlx-core/src/net/socket/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ pub async fn connect_uds<P: AsRef<Path>, Ws: WithSocket>(
302302

303303
let stream = Async::<UnixStream>::connect(path).await?;
304304

305-
Ok(with_socket.with_socket(stream).await)
305+
return Ok(with_socket.with_socket(stream).await);
306306
}
307307

308308
#[cfg(feature = "_rt-async-std")]
@@ -312,10 +312,11 @@ pub async fn connect_uds<P: AsRef<Path>, Ws: WithSocket>(
312312

313313
let stream = Async::<UnixStream>::connect(path).await?;
314314

315-
Ok(with_socket.with_socket(stream).await)
315+
return Ok(with_socket.with_socket(stream).await);
316316
}
317317

318318
#[cfg(not(all(feature = "_rt-async-global-executor", feature = "_rt-async-std")))]
319+
#[allow(unreachable_code)]
319320
{
320321
crate::rt::missing_rt((path, with_socket))
321322
}

0 commit comments

Comments
 (0)