Skip to content

Commit

Permalink
Merge #434
Browse files Browse the repository at this point in the history
434: Update darling requirement from 0.13.4 to 0.14.0 r=jonasbb a=dependabot[bot]

Updates the requirements on [darling](https://github.com/TedDriggs/darling) to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/TedDriggs/darling/releases">darling's releases</a>.</em></p>
<blockquote>
<h2>v0.14.0</h2>
<ul>
<li><strong>BREAKING CHANGE:</strong> Remove many trait impls from <code>util::Flag</code>.
This type had a number of deref and operator impls that made it usable as sort-of-a-boolean.
Real-world usage showed this type is more useful if it's able to carry a span for good errors,
and that most of those impls were unnecessary. <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/179">#179</a></li>
<li>Remove need for <code>#[darling(default)]</code> on <code>Option&lt;T&gt;</code> and <code>Flag</code> fields <a href="https://github-redirect.dependabot.com/TedDriggs/darling/issues/161">#161</a></li>
<li>Improve validation of enum shapes <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/178">#178</a></li>
<li>Bump <code>proc-macro2</code> dependency to 1.0.37 <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/180">#180</a></li>
<li>Bump <code>quote</code> dependency to 1.0.18 <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/180">#180</a></li>
<li>Bump <code>syn</code> dependency to 1.0.91 <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/180">#180</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/TedDriggs/darling/blob/master/CHANGELOG.md">darling's changelog</a>.</em></p>
<blockquote>
<h2>v0.14.0 (April 13, 2022)</h2>
<ul>
<li><strong>BREAKING CHANGE:</strong> Remove many trait impls from <code>util::Flag</code>.
This type had a number of deref and operator impls that made it usable as sort-of-a-boolean.
Real-world usage showed this type is more useful if it's able to carry a span for good errors,
and that most of those impls were unnecessary. <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/179">#179</a></li>
<li>Remove need for <code>#[darling(default)]</code> on <code>Option&lt;T&gt;</code> and <code>Flag</code> fields <a href="https://github-redirect.dependabot.com/TedDriggs/darling/issues/161">#161</a></li>
<li>Improve validation of enum shapes <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/178">#178</a></li>
<li>Bump <code>proc-macro2</code> dependency to 1.0.37 <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/180">#180</a></li>
<li>Bump <code>quote</code> dependency to 1.0.18 <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/180">#180</a></li>
<li>Bump <code>syn</code> dependency to 1.0.91 <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/180">#180</a></li>
</ul>
<h2>v0.13.4 (April 6, 2022)</h2>
<ul>
<li>Impl <code>FromMeta</code> for <code>syn::Visibility</code> <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/173">#173</a></li>
</ul>
<h2>v0.13.3 (April 5, 2022)</h2>
<ul>
<li>Add <code>error::Accumulator</code> for dealing with multiple errors <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/164">#164</a></li>
<li>Impl <code>FromMeta</code> for <code>syn::Type</code> and its variants <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pulls/172">#172</a></li>
</ul>
<h2>v0.13.2 (March 30, 2022)</h2>
<ul>
<li>Impl <code>FromMeta</code> for <code>syn::ExprPath</code> <a href="https://github-redirect.dependabot.com/TedDriggs/darling/issues/169">#169</a></li>
</ul>
<h2>v0.13.1 (December 7, 2021)</h2>
<ul>
<li>Add <code>FromAttributes</code> trait and macro <a href="https://github-redirect.dependabot.com/TedDriggs/darling/issues/151">#151</a></li>
</ul>
<h2>v0.13.0 (May 20, 2021)</h2>
<ul>
<li>Update darling to 2018 edition <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/129">#129</a></li>
<li>Error on duplicate fields in <code>#[darling(...)]</code> attributes <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/130">#130</a></li>
<li>Impl <code>Copy</code> for <code>SpannedValue&lt;T: Copy&gt;</code></li>
<li>Add <code>SpannedValue::map_ref</code></li>
</ul>
<h2>v0.13.0-beta (April 20, 2021)</h2>
<ul>
<li>Update darling to 2018 edition <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/129">#129</a></li>
<li>Error on duplicate fields in <code>#[darling(...)]</code> attributes <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/130">#130</a></li>
</ul>
<h2>v0.12.4 (April 20, 2021)</h2>
<ul>
<li>Add <code>and_then</code> to derive macros for <code>darling</code></li>
</ul>
<h2>v0.12.3 (April 8, 2021)</h2>
<ul>
<li>Fix <code>FromMeta</code> impl for <code>char</code> not to panic <a href="https://github-redirect.dependabot.com/TedDriggs/darling/pull/126">#126</a></li>
</ul>
<h2>v0.12.2 (February 23, 2021)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/TedDriggs/darling/commit/3f3664788adb1db15f18c71968000b20fe019efe"><code>3f36647</code></a> Bump version to 0.14.0</li>
<li><a href="https://github.com/TedDriggs/darling/commit/77075f433f580f5213e211cb778c3c7af7f7926d"><code>77075f4</code></a> Bump min versions of quote, syn, and proc-macro2</li>
<li><a href="https://github.com/TedDriggs/darling/commit/3c7d57a68932f5fc99ad8d4e1a12a85ab003d263"><code>3c7d57a</code></a> Update documentation to capture <a href="https://github-redirect.dependabot.com/TedDriggs/darling/issues/161">#161</a></li>
<li><a href="https://github.com/TedDriggs/darling/commit/bb12ae225ac2dd4ec348ddbdb3b1252d22aa4c8f"><code>bb12ae2</code></a> Add CHANGELOG entry for Flag</li>
<li><a href="https://github.com/TedDriggs/darling/commit/b8bc2770b791ec917088124e3b9e406383b538d0"><code>b8bc277</code></a> Improve Flag documentation</li>
<li><a href="https://github.com/TedDriggs/darling/commit/956ef2bd69035689ba6ebb675af8bb8fde5f721a"><code>956ef2b</code></a> Add Span to util::Flag, and remove Deref impl</li>
<li><a href="https://github.com/TedDriggs/darling/commit/2e29e0e7c93a0388a211fcd931040d468f66d9cc"><code>2e29e0e</code></a> Accept allow_unknown_fields = false</li>
<li><a href="https://github.com/TedDriggs/darling/commit/09ecbd64d375bacb05206bc7b7c1368fc40f1f96"><code>09ecbd6</code></a> Move Flag to its own module</li>
<li><a href="https://github.com/TedDriggs/darling/commit/445e6bbab38f18368abf7229ff4c5004e2846ac8"><code>445e6bb</code></a> Improve enum shape validation (<a href="https://github-redirect.dependabot.com/TedDriggs/darling/issues/178">#178</a>)</li>
<li><a href="https://github.com/TedDriggs/darling/commit/a0fb9cceab43fb3fe5e21ada7f247bd35da7022f"><code>a0fb9cc</code></a> Use from_none in codegen</li>
<li>Additional commits viewable in <a href="https://github.com/TedDriggs/darling/compare/v0.13.4...v0.14.0">compare view</a></li>
</ul>
</details>
<br />


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>
Co-authored-by: Jonas Bushart <jonas@bushart.org>
  • Loading branch information
3 people committed Apr 17, 2022
2 parents 8b5cfe9 + f4fc487 commit a8bce82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion serde_with_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ proc-macro = true
maintenance = {status = "actively-developed"}

[dependencies]
darling = "0.13.4"
darling = "0.14.0"
proc-macro2 = "1.0.1"
quote = "1.0.0"

Expand Down
10 changes: 2 additions & 8 deletions serde_with_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ fn field_has_attribute(field: &Field, namespace: &str, name: &str) -> bool {
pub fn serde_as(args: TokenStream, input: TokenStream) -> TokenStream {
#[derive(FromMeta, Debug)]
struct SerdeContainerOptions {
#[darling(rename = "crate", default)]
#[darling(rename = "crate")]
alt_crate_path: Option<String>,
}

Expand Down Expand Up @@ -525,11 +525,9 @@ fn serde_as_add_attr_to_field(
#[derive(FromField, Debug)]
#[darling(attributes(serde_as))]
struct SerdeAsOptions {
#[darling(rename = "as", default)]
#[darling(rename = "as")]
r#as: Option<Type>,
#[darling(default)]
deserialize_as: Option<Type>,
#[darling(default)]
serialize_as: Option<Type>,
}

Expand All @@ -542,14 +540,10 @@ fn serde_as_add_attr_to_field(
#[derive(FromField, Debug)]
#[darling(attributes(serde), allow_unknown_fields)]
struct SerdeOptions {
#[darling(default)]
with: Option<String>,
#[darling(default)]
deserialize_with: Option<String>,
#[darling(default)]
serialize_with: Option<String>,

#[darling(default)]
borrow: Option<Override<String>>,
}

Expand Down

0 comments on commit a8bce82

Please sign in to comment.