-
Notifications
You must be signed in to change notification settings - Fork 191
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
Fix macro hygiene #694
Fix macro hygiene #694
Conversation
Easy way to trigger the problem: use anyhow::Ok;
use uuid::{uuid, Uuid};
const SOME_UUID: Uuid = uuid!("00000000-0000-0000-0000-000000000000"); Example of error message when running into this macro hygiene issue:
|
ping @KodrAus |
Thanks for the PR @teohhanhui! This looks good to me, but would you be happy to add a test case here that exercises it? You could replace the |
Re-export Ok and Err
74ffb04
to
1d1ae31
Compare
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this up @teohhanhui!
Bumps uuid from 1.4.0 to 1.4.1. Release notes Sourced from uuid's releases. 1.4.1 What's Changed Fix macro hygiene by @teohhanhui in uuid-rs/uuid#694 Add #[inline] for Uuid::from_bytes[_ref] and Uuid::{as,into}_bytes by @jrose-signal in uuid-rs/uuid#693 Print uuids in examples by @KodrAus in uuid-rs/uuid#697 Prepare for 1.4.1 release by @KodrAus in uuid-rs/uuid#698 New Contributors @teohhanhui made their first contribution in uuid-rs/uuid#694 @jrose-signal made their first contribution in uuid-rs/uuid#693 Full Changelog: uuid-rs/uuid@1.4.0...1.4.1 Commits 97b7f07 Merge pull request #698 from uuid-rs/cargo/1.4.1 8e930cf prepare for 1.4.1 release 0041b3b Merge pull request #697 from uuid-rs/chore/example-printing 5a1f3f5 use uuid_unstable 6b0cfb2 Merge pull request #693 from jrose-signal/inline-from_bytes 33f6b3e print uuids in examples bd7df72 Merge pull request #694 from teohhanhui/fix/macro-hygiene 1d1ae31 Fix macro hygiene 317d925 Add #[inline] for Uuid::from_bytes[_ref] and Uuid::{as,into}_bytes See full diff in compare view 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)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [uuid](https://togithub.com/uuid-rs/uuid) | dependencies | minor | `1.3.4` -> `1.4.1` | --- ### Release Notes <details> <summary>uuid-rs/uuid (uuid)</summary> ### [`v1.4.1`](https://togithub.com/uuid-rs/uuid/releases/tag/1.4.1) [Compare Source](https://togithub.com/uuid-rs/uuid/compare/1.4.0...1.4.1) #### What's Changed - Fix macro hygiene by [@​teohhanhui](https://togithub.com/teohhanhui) in [https://github.com/uuid-rs/uuid/pull/694](https://togithub.com/uuid-rs/uuid/pull/694) - Add #\[inline] for Uuid::from_bytes\[\_ref] and Uuid::{as,into}\_bytes by [@​jrose-signal](https://togithub.com/jrose-signal) in [https://github.com/uuid-rs/uuid/pull/693](https://togithub.com/uuid-rs/uuid/pull/693) - Print uuids in examples by [@​KodrAus](https://togithub.com/KodrAus) in [https://github.com/uuid-rs/uuid/pull/697](https://togithub.com/uuid-rs/uuid/pull/697) - Prepare for 1.4.1 release by [@​KodrAus](https://togithub.com/KodrAus) in [https://github.com/uuid-rs/uuid/pull/698](https://togithub.com/uuid-rs/uuid/pull/698) #### New Contributors - [@​teohhanhui](https://togithub.com/teohhanhui) made their first contribution in [https://github.com/uuid-rs/uuid/pull/694](https://togithub.com/uuid-rs/uuid/pull/694) - [@​jrose-signal](https://togithub.com/jrose-signal) made their first contribution in [https://github.com/uuid-rs/uuid/pull/693](https://togithub.com/uuid-rs/uuid/pull/693) **Full Changelog**: uuid-rs/uuid@1.4.0...1.4.1 ### [`v1.4.0`](https://togithub.com/uuid-rs/uuid/releases/tag/1.4.0) [Compare Source](https://togithub.com/uuid-rs/uuid/compare/1.3.4...1.4.0) #### What's Changed - Fixed wasm tests not running due to incorrect attribute target by [@​kmusick](https://togithub.com/kmusick) in [https://github.com/uuid-rs/uuid/pull/688](https://togithub.com/uuid-rs/uuid/pull/688) - Fixing issue with Cloudflare Workers and wasm32-unknown-unknown when using now() by [@​kmusick](https://togithub.com/kmusick) in [https://github.com/uuid-rs/uuid/pull/690](https://togithub.com/uuid-rs/uuid/pull/690) - Add `borsh` support by [@​grovesNL](https://togithub.com/grovesNL) in [https://github.com/uuid-rs/uuid/pull/686](https://togithub.com/uuid-rs/uuid/pull/686) - Fix some timestamp generation by [@​KodrAus](https://togithub.com/KodrAus) in [https://github.com/uuid-rs/uuid/pull/691](https://togithub.com/uuid-rs/uuid/pull/691) - Prepare for 1.4.0 release by [@​KodrAus](https://togithub.com/KodrAus) in [https://github.com/uuid-rs/uuid/pull/692](https://togithub.com/uuid-rs/uuid/pull/692) #### New Contributors - [@​kmusick](https://togithub.com/kmusick) made their first contribution in [https://github.com/uuid-rs/uuid/pull/688](https://togithub.com/uuid-rs/uuid/pull/688) - [@​grovesNL](https://togithub.com/grovesNL) made their first contribution in [https://github.com/uuid-rs/uuid/pull/686](https://togithub.com/uuid-rs/uuid/pull/686) **Full Changelog**: uuid-rs/uuid@1.3.4...1.4.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. --- - [ ] <!-- rebase-check -->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/akrantz01/lers). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNDEuMyIsInVwZGF0ZWRJblZlciI6IjM2LjguMTEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [uuid](https://github.com/uuid-rs/uuid) | dependencies | patch | `1.4.0` -> `1.4.1` | --- ### Release Notes <details> <summary>uuid-rs/uuid (uuid)</summary> ### [`v1.4.1`](https://github.com/uuid-rs/uuid/releases/tag/1.4.1) [Compare Source](uuid-rs/uuid@1.4.0...1.4.1) #### What's Changed - Fix macro hygiene by [@​teohhanhui](https://github.com/teohhanhui) in uuid-rs/uuid#694 - Add #\[inline] for Uuid::from_bytes\[\_ref] and Uuid::{as,into}\_bytes by [@​jrose-signal](https://github.com/jrose-signal) in uuid-rs/uuid#693 - Print uuids in examples by [@​KodrAus](https://github.com/KodrAus) in uuid-rs/uuid#697 - Prepare for 1.4.1 release by [@​KodrAus](https://github.com/KodrAus) in uuid-rs/uuid#698 #### New Contributors - [@​teohhanhui](https://github.com/teohhanhui) made their first contribution in uuid-rs/uuid#694 - [@​jrose-signal](https://github.com/jrose-signal) made their first contribution in uuid-rs/uuid#693 **Full Changelog**: uuid-rs/uuid@1.4.0...1.4.1 </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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi44LjExIiwidXBkYXRlZEluVmVyIjoiMzYuOC4xMSIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AifQ==--> Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Co-authored-by: crapStone <crapstone01@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1962 Reviewed-by: crapStone <crapstone01@gmail.com> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Re-export Ok and Err