Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix transction rollback onFuture drop#1121

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
wquark wants to merge3 commits intorust-postgres:masterfromcubexch:master

Conversation

wquark
Copy link

PR for#1120. Also rollsback the savepoint (found while implementing this).

@sfackler
Copy link
Collaborator

Looks good to me other than the one nit!

@sfackler
Copy link
Collaborator

Looks like it needs acargo fmt, and this should fix the chrono deprecation warning:

diff --git a/postgres-types/src/chrono_04.rs b/postgres-types/src/chrono_04.rsindex d599bde0..64166309 100644--- a/postgres-types/src/chrono_04.rs+++ b/postgres-types/src/chrono_04.rs@@ -111,9 +111,10 @@ impl ToSql for DateTime<FixedOffset> { impl<'a> FromSql<'a> for NaiveDate {     fn from_sql(_: &Type, raw: &[u8]) -> Result<NaiveDate, Box<dyn Error + Sync + Send>> {         let jd = types::date_from_sql(raw)?;+        let jd = Duration::try_days(jd)?;         base()             .date()-            .checked_add_signed(Duration::days(i64::from(jd)))+            .checked_add_signed(jd)             .ok_or_else(|| "value too large to decode".into())     }

- fixes drop of `Future` after synchronous message send but before  `Transaction` object creation- follow-on torust-postgres@f6189a9  for `TransactionBuilder` and savepoint `Transaction::transaction`  creation
- use non-deprecated `Duration::try_days` method- remove redundant top-level `rand` import
@wquark
Copy link
Author

Rancargo fmt and fixed warnings. Left the warning fixes in a separate commit since they seemed unrelated.

@wquark
Copy link
Author

Hey@sfackler, would be great to get this pushed forward so we can remove our patched dependencies. Let me know if there are other blockers, thanks.

@wquark
Copy link
Author

@sfackler another bump on merging this PR. Any other blockers?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@sfacklersfacklersfackler left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@wquark@sfackler

[8]ページ先頭

©2009-2025 Movatter.jp