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

allow BorrowToSql for non-static Box<dyn ToSql> #1029

Merged
merged 2 commits into from
May 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- run: docker compose up -d
- uses: sfackler/actions/rustup@master
with:
version: 1.64.0
version: 1.65.0
- run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
id: rust-version
- uses: actions/cache@v3
Expand Down
8 changes: 4 additions & 4 deletions postgres-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1178,17 +1178,17 @@ impl BorrowToSql for &dyn ToSql {
}
}

impl sealed::Sealed for Box<dyn ToSql + Sync> {}
impl<'a> sealed::Sealed for Box<dyn ToSql + Sync + 'a> {}

impl BorrowToSql for Box<dyn ToSql + Sync> {
impl<'a> BorrowToSql for Box<dyn ToSql + Sync + 'a> {
#[inline]
fn borrow_to_sql(&self) -> &dyn ToSql {
self.as_ref()
}
}

impl sealed::Sealed for Box<dyn ToSql + Sync + Send> {}
impl BorrowToSql for Box<dyn ToSql + Sync + Send> {
impl<'a> sealed::Sealed for Box<dyn ToSql + Sync + Send + 'a> {}
impl<'a> BorrowToSql for Box<dyn ToSql + Sync + Send + 'a> {
#[inline]
fn borrow_to_sql(&self) -> &dyn ToSql {
self.as_ref()
Expand Down