Support truncating or strict-named variants of parsing and formatting by KodrAus · Pull Request #400 · bitflags/bitflags · GitHub
Skip to content

Support truncating or strict-named variants of parsing and formatting - #400

Merged
KodrAus merged 1 commit into
bitflags:mainfrom
KodrAus:feat/parser-modes
Mar 19, 2024
Merged

KodrAus merged 1 commit into
bitflags:mainfrom
KodrAus:feat/parser-modes

Conversation

@KodrAus

@KodrAus KodrAus commented Mar 18, 2024

Copy link
Copy Markdown
Member

This PR fills in the missing gaps from the spec around parsing/formatting modes. It adds two new variants of parser::from_str and parser::to_writer:

  • from_str_truncate/to_writer_truncate: Truncates any unknown bits, but still supports parsing and formatting hex values, like A | 0x2
  • from_str_strict/to_writer_strict: Only format and parse defined names, ignoring any other bits in formatting, and failing on them in parsing, like A | B.

@KodrAus
KodrAus merged commit 6965e84 into bitflags:main Mar 19, 2024
mergify Bot referenced this pull request in andrzejressel/pulumi-gestalt Mar 19, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [bitflags](https://togithub.com/bitflags/bitflags) | workspace.dependencies | minor | `2.4.2` -> `2.5.0` |

---

### Release Notes

<details>
<summary>bitflags/bitflags (bitflags)</summary>

### [`v2.5.0`](https://togithub.com/bitflags/bitflags/blob/HEAD/CHANGELOG.md#250)

[Compare Source](https://togithub.com/bitflags/bitflags/compare/2.4.2...2.5.0)

#### What's Changed

-   Derive `Debug` for `Flag<B>` by [@&#8203;tgross35](https://togithub.com/tgross35) in [https://github.com/bitflags/bitflags/pull/398](https://togithub.com/bitflags/bitflags/pull/398)
-   Support truncating or strict-named variants of parsing and formatting by [@&#8203;KodrAus](https://togithub.com/KodrAus) in [https://github.com/bitflags/bitflags/pull/400](https://togithub.com/bitflags/bitflags/pull/400)

#### New Contributors

-   [@&#8203;tgross35](https://togithub.com/tgross35) made their first contribution in [https://github.com/bitflags/bitflags/pull/398](https://togithub.com/bitflags/bitflags/pull/398)

**Full Changelog**: bitflags/bitflags@2.4.2...2.5.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/andrzejressel/pulumi-wasm).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant