-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Implement Acquire for PgListener #3550
base: main
Are you sure you want to change the base?
Conversation
(not a maintainer) |
Good suggestion, I've just added that! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one nit.
sqlx-postgres/src/listener.rs
Outdated
type Connection = &'c mut PgConnection; | ||
|
||
fn acquire(self) -> BoxFuture<'c, Result<Self::Connection, Error>> { | ||
self.connection().and_then(|c| c.acquire()).boxed() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling c.acquire()
is redundant and just creates an extraneous BoxFuture
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, fixed in 3752cbc
Does your PR solve an issue?
Fixes #3549