Skip to content

Commit

Permalink
Merge pull request #1029 from laptou/master
Browse files Browse the repository at this point in the history
allow `BorrowToSql` for non-static `Box<dyn ToSql>`
  • Loading branch information
sfackler authored May 7, 2023
2 parents 23d2524 + 066b466 commit 22469d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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 @@ -1184,17 +1184,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

0 comments on commit 22469d6

Please sign in to comment.