Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove BoxFuture's (non-breaking) #3629

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: better document previous changes
  • Loading branch information
joeydewaal committed Dec 11, 2024
commit 1cc7c777e02cb4ccc88b710f8a4e1a1b78e0755c
1 change: 1 addition & 0 deletions sqlx-postgres/src/connection/describe.rs
Original file line number Diff line number Diff line change
@@ -168,6 +168,7 @@ impl PgConnection {

// fallback to asking the database directly for a type name
if should_fetch {
// we're boxing this future here so we can use async recursion
let info = Box::pin(async { self.fetch_type_by_oid(oid).await }).await?;
joeydewaal marked this conversation as resolved.
Show resolved Hide resolved

// cache the type name <-> oid relationship in a paired hashmap
4 changes: 2 additions & 2 deletions sqlx-postgres/src/connection/stream.rs
Original file line number Diff line number Diff line change
@@ -42,12 +42,12 @@ pub struct PgStream {

impl PgStream {
pub(super) async fn connect(options: &PgConnectOptions) -> Result<Self, Error> {
let socket_future = match options.fetch_socket() {
let socket_result = match options.fetch_socket() {
Some(ref path) => net::connect_uds(path, MaybeUpgradeTls(options)).await?,
None => net::connect_tcp(&options.host, options.port, MaybeUpgradeTls(options)).await?,
};

let socket = socket_future?;
let socket = socket_result?;

Ok(Self {
inner: BufferedSocket::new(socket),
Loading