forked from jonasbb/serde_with
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[pull] master from jonasbb:master #45
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
571: Provide length when serializing sequence r=jonasbb a=stephaneyfx Some serializers (e.g. bincode) require a length to serialize a sequence. This code does what `iterator_len_hint` does (called by `collect_seq` in `serde`). Resolves #570 Co-authored-by: Stephane Raux <stephaneyfx@gmail.com>
Highlight what is the default, with an extra sentence and emphasis in the tables. Unhide the `std::time::Duration` in the examples. Closes #575
576: Better explain the default FORMAT for DurationSeconds/TimestampSeconds r=jonasbb a=jonasbb Highlight what is the default, with an extra sentence and emphasis in the tables. Unhide the `std::time::Duration` in the examples. Closes #575 Co-authored-by: Jonas Bushart <jonas@bushart.org>
Mention that it is supposed to mirror the type structure of the field and what the special `_` placeholder means. This was mentioned as insufficiently explained in #582.
583: Explain better how to use serde_as r=jonasbb a=jonasbb Mention that it is supposed to mirror the type structure of the field and what the special `_` placeholder means. This was mentioned as insufficiently explained in #582. bors r+ Co-authored-by: Jonas Bushart <jonas@bushart.org>
Untagged enums do not provide good error messages and likely never will, given that there are multiple PRs which are just completely ignored ([serde#2376](serde-rs/serde#2376) and [serde#1544](serde-rs/serde#1544)). Instead using `content::de` the untagged enums can be replaced by custom buffering. The error messages for `OneOrMany` and `PickFirst` now look like this, including the original failure for each variant. ```text OneOrMany could not deserialize any variant: One: invalid type: map, expected u32 Many: invalid type: map, expected a sequence ``` ```text PickFirst could not deserialize any variant: First: invalid type: string "Abc", expected u32 Second: invalid digit found in string ``` The implementations of `VecSkipError` and `DefaultOnError` are updated too, but should not result in any visible changes.
586: Improve error messaged by dropping untagged enums r=jonasbb a=jonasbb Untagged enums do not provide good error messages and likely never will, given that there are multiple PRs which are just completely ignored ([serde#2376](serde-rs/serde#2376) and [serde#1544](serde-rs/serde#1544)). Instead using `content::de` the untagged enums can be replaced by custom buffering. The error messages for `OneOrMany` and `PickFirst` now look like this, including the original failure for each variant. ```text OneOrMany could not deserialize any variant: One: invalid type: map, expected u32 Many: invalid type: map, expected a sequence ``` ```text PickFirst could not deserialize any variant: First: invalid type: string "Abc", expected u32 Second: invalid digit found in string ``` The implementations of `VecSkipError` and `DefaultOnError` are updated too, but should not result in any visible changes. Co-authored-by: Jonas Bushart <jonas@bushart.org>
proc-macros are badly supported by tarpaulin, leading to mostly uncovered lines, so we exclude them from the reporting. The `content` module is copied from `serde` but without extensive tests.
587: Tweak the coverage configuration r=jonasbb a=jonasbb proc-macros are badly supported by tarpaulin, leading to mostly uncovered lines, so we exclude them from the reporting. The `content` module is copied from `serde` but without extensive tests. bors r+ Co-authored-by: Jonas Bushart <jonas@bushart.org>
`serde::de::value::StringDeserializer::new` was introduced in 1.0.139.
Bumps [regex](https://github.com/rust-lang/regex) from 1.7.1 to 1.8.1. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](rust-lang/regex@1.7.1...1.8.1) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
591: Bump regex from 1.7.1 to 1.8.1 r=jonasbb a=dependabot[bot] Bumps [regex](https://github.com/rust-lang/regex) from 1.7.1 to 1.8.1. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rust-lang/regex/blob/master/CHANGELOG.md">regex's changelog</a>.</em></p> <blockquote> <h1>1.8.1 (2023-04-21)</h1> <p>This is a patch release that fixes a bug where a regex match could be reported where none was found. Specifically, the bug occurs when a pattern contains some literal prefixes that could be extracted <em>and</em> an optional word boundary in the prefix.</p> <p>Bug fixes:</p> <ul> <li>[BUG <a href="https://redirect.github.com/rust-lang/regex/issues/981">#981</a>](<a href="https://redirect.github.com/rust-lang/regex/issues/981">rust-lang/regex#981</a>): Fix a bug where a word boundary could interact with prefix literal optimizations and lead to a false positive match.</li> </ul> <h1>1.8.0 (2023-04-20)</h1> <p>This is a sizeable release that will be soon followed by another sizeable release. Both of them will combined close over 40 existing issues and PRs.</p> <p>This first release, despite its size, essentially represent preparatory work for the second release, which will be even bigger. Namely, this release:</p> <ul> <li>Increases the MSRV to Rust 1.60.0, which was released about 1 year ago.</li> <li>Upgrades its dependency on <code>aho-corasick</code> to the recently release 1.0 version.</li> <li>Upgrades its dependency on <code>regex-syntax</code> to the simultaneously released <code>0.7</code> version. The changes to <code>regex-syntax</code> principally revolve around a rewrite of its literal extraction code and a number of simplifications and optimizations to its high-level intermediate representation (HIR).</li> </ul> <p>The second release, which will follow ~shortly after the release above, will contain a soup-to-nuts rewrite of every regex engine. This will be done by bringing <a href="https://github.com/BurntSushi/regex-automata"><code>regex-automata</code></a> into this repository, and then changing the <code>regex</code> crate to be nothing but an API shim layer on top of <code>regex-automata</code>'s API.</p> <p>These tandem releases are the culmination of about 3 years of on-and-off work that <a href="https://redirect.github.com/rust-lang/regex/issues/656">began in earnest in March 2020</a>.</p> <p>Because of the scale of changes involved in these releases, I would love to hear about your experience. Especially if you notice undocumented changes in behavior or performance changes (positive <em>or</em> negative).</p> <p>Most changes in the first release are listed below. For more details, please see the commit log, which reflects a linear and decently documented history of all changes.</p> <p>New features:</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/rust-lang/regex/commit/4e29fceace6f3c189f78b1baaec6755f27d69ffb"><code>4e29fce</code></a> 1.8.1</li> <li><a href="https://github.com/rust-lang/regex/commit/8a7cb645cfd7c4e0f77482e8894155b93ca5fc3f"><code>8a7cb64</code></a> deps: bump regex-syntax to 0.7.1</li> <li><a href="https://github.com/rust-lang/regex/commit/31c845296c5d34092aae637a02bf0d757a35f646"><code>31c8452</code></a> regex-syntax-0.7.1</li> <li><a href="https://github.com/rust-lang/regex/commit/960aadeba06420f8b979aa983fd55429c42d3e4a"><code>960aade</code></a> changelog: 1.8.1</li> <li><a href="https://github.com/rust-lang/regex/commit/f003d72578c84d3b849fa1c59724e003338a3ca1"><code>f003d72</code></a> impl: fix prefix literal matching bug</li> <li><a href="https://github.com/rust-lang/regex/commit/93316a3b1adc43cc12fab6c73a59f646658cd984"><code>93316a3</code></a> doc: update MSRV in README</li> <li><a href="https://github.com/rust-lang/regex/commit/070374f2878f23809a4e5ca0810d523f692c6e7e"><code>070374f</code></a> release: 1.8.0</li> <li><a href="https://github.com/rust-lang/regex/commit/a73c61cecbf24ebf70699269cca95b991dbe2e7e"><code>a73c61c</code></a> fuzz: get rid of 'named-profiles' feature</li> <li><a href="https://github.com/rust-lang/regex/commit/7cd75d22b56f60dc711976242a5cbca9e5922413"><code>7cd75d2</code></a> changelog: tweaks to 1.8 release entry</li> <li><a href="https://github.com/rust-lang/regex/commit/33898de870fc584ce912651590d8715d1178e667"><code>33898de</code></a> syntax: fix bug in new alternation literal analysis</li> <li>Additional commits viewable in <a href="https://github.com/rust-lang/regex/compare/1.7.1...1.8.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=regex&package-manager=cargo&previous-version=1.7.1&new-version=1.8.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Based on this darling PR: TedDriggs/darling#226
write! with a single string argument is not properly optimized and using write_str generates better code: serde-rs/serde#2697 rust-lang/rust#121001
Fix some doclinks
The bug rust#78894 in rustc is now a problem, since more warnings are issued. rust-lang/rust#78894 rust-lang/rust#117772
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )