#261 Upgrade syn dependency to version 2. This bumps the msrv to
1.56. It's impractical to maintain a package where a core dependency of the ecosystem has a different msrv than this one.
270 Change the to_string behavior when using default. Now, when
using default, the display method will return the display version of the value contained in the enum rather than
the name of the variant.
#[derive(strum::Display)]
enum Color {
Red,
Blue,
Green,
#[strum(default)]
Other(String)
}
fn main() {
// This used to print "Other", now it prints "Purple"
assert_eq!(Color::Other("Purple".to_string()).to_string(), "Purple");
}
If you want the old behavior, you can use the to_string attribute to override this behavior. See the PR for an example.
268 Update the behavior of EnumCount to exclude variants that are
disabled. This is a breaking change, but the behavior makes it more consistent with other methods.
New Features
#257 This PR adds the EnumIs macro that automatically implements
is_{variant_name} methods for each variant.
#[derive(EnumIs)]
enum Color {
Red,
Blue,
Green,
}
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 commands and options
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)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/LGUG2Z/komorebi/pull/473
**Author:** [@dependabot[bot]](https://github.com/apps/dependabot)
**Created:** 6/26/2023
**Status:** ✅ Merged
**Merged:** 6/26/2023
**Merged by:** [@LGUG2Z](https://github.com/LGUG2Z)
**Base:** `master` ← **Head:** `dependabot/cargo/strum-0.25.0`
---
### 📝 Commits (1)
- [`8f3b373`](https://github.com/LGUG2Z/komorebi/commit/8f3b37311b94e8406197beeb6428f46d6f76dd0a) chore(deps): bump strum from 0.24.1 to 0.25.0
### 📊 Changes
**3 files changed** (+7 additions, -7 deletions)
<details>
<summary>View changed files</summary>
📝 `Cargo.lock` (+5 -5)
📝 `komorebi-core/Cargo.toml` (+1 -1)
📝 `komorebi/Cargo.toml` (+1 -1)
</details>
### 📄 Description
Bumps [strum](https://github.com/Peternator7/strum) from 0.24.1 to 0.25.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/Peternator7/strum/blob/master/CHANGELOG.md">strum's changelog</a>.</em></p>
<blockquote>
<h2>0.25.0</h2>
<h3>Breaking Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/Peternator7/strum/pull/261">#261</a> Upgrade syn dependency to version 2. This bumps the msrv to
1.56. It's impractical to maintain a package where a core dependency of the ecosystem has a different msrv than this one.</p>
</li>
<li>
<p><a href="https://redirect.github.com/Peternator7/strum/pull/270">270</a> Change the <code>to_string</code> behavior when using <code>default</code>. Now, when
using <code>default</code>, the <code>display</code> method will return the display version of the value contained in the enum rather than
the name of the variant.</p>
<pre lang="rust"><code>#[derive(strum::Display)]
enum Color {
Red,
Blue,
Green,
#[strum(default)]
Other(String)
}
<p>fn main() {
// This used to print "Other", now it prints "Purple"
assert_eq!(Color::Other("Purple".to_string()).to_string(), "Purple");
}
</code></pre></p>
<p>If you want the old behavior, you can use the <code>to_string</code> attribute to override this behavior. See the PR for an example.</p>
</li>
<li>
<p><a href="https://redirect.github.com/Peternator7/strum/pull/268">268</a> Update the behavior of <code>EnumCount</code> to exclude variants that are
<code>disabled</code>. This is a breaking change, but the behavior makes it more consistent with other methods.</p>
</li>
</ul>
<h3>New Features</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/Peternator7/strum/pull/257">#257</a> This PR adds the <code>EnumIs</code> macro that automatically implements
<code>is_{variant_name}</code> methods for each variant.</p>
<pre lang="rust"><code>#[derive(EnumIs)]
enum Color {
Red,
Blue,
Green,
}
<p>#[test]
fn simple_test() {
assert!(Color::Red.is_red());
}
</code></pre></p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/Peternator7/strum/commits">compare view</a></li>
</ul>
</details>
<br />
[](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>
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/LGUG2Z/komorebi/pull/473
Author: @dependabot[bot]
Created: 6/26/2023
Status: ✅ Merged
Merged: 6/26/2023
Merged by: @LGUG2Z
Base:
master← Head:dependabot/cargo/strum-0.25.0📝 Commits (1)
8f3b373chore(deps): bump strum from 0.24.1 to 0.25.0📊 Changes
3 files changed (+7 additions, -7 deletions)
View changed files
📝
Cargo.lock(+5 -5)📝
komorebi-core/Cargo.toml(+1 -1)📝
komorebi/Cargo.toml(+1 -1)📄 Description
Bumps strum from 0.24.1 to 0.25.0.
Changelog
Sourced from strum's changelog.
... (truncated)
Commits
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 commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.