Skip to content

[CLONE/FIXES][FEATURE]: Generics, lifetimes, where clauses and internal field variant formatting #6

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

SeedyROM
Copy link
Owner

@SeedyROM SeedyROM commented Jul 14, 2025

Details

Branched from #5, see that PR for full details.

Additions (from #7)

  • Rename variant_display to display.
    • Accept unnamed format arguments to this macro.

Fixes

  • Issues with pipeline using previously published proc macro, use a workspace locally and have versions and paths available.
  • Remove functions called gen as it's a reserved keyword
  • Run cargo clippy and cargo fmt

jngls and others added 6 commits June 16, 2025 21:16
- Bump version number before publish
- `gen` is a reserved keyword: https://doc.rust-lang.org/edition-guide/rust-2024/gen-keyword.html
- Rename all functions named `gen` to `generate`
- Allow for local testing via workspaces, however when publishing the local dep needs to be replaced with the published version
   - This allowed for the actual proc_macro code changes to propegate into the local build.
@SeedyROM SeedyROM self-assigned this Jul 14, 2025
@SeedyROM SeedyROM changed the title [FEATURE]: Generics, lifetimes, where clauses and internal field variant formatting [CLONE/FIXES][FEATURE]: Generics, lifetimes, where clauses and internal field variant formatting Jul 14, 2025
SeedyROM

This comment was marked as outdated.

@SeedyROM SeedyROM mentioned this pull request Aug 1, 2025
@SeedyROM
Copy link
Owner Author

SeedyROM commented Aug 1, 2025

I finally have some free time to focus on this again. There was an issue created with a suggestion I think I'd like to add. I also think I'd like to remove the {variant} part of the macro and attempt to just have {} (Bad idea, having the variant as part of the format string is the best way to go, I was getting ahead of myself). Going to experiment with this.

- Rename `variant_display` to `display`
- Support named argument `format=` and first argument for format.
@SeedyROM SeedyROM added enhancement New feature or request help wanted Extra attention is needed labels Aug 1, 2025
@@ -13,4 +13,4 @@ homepage = "https://github.com/SeedyROM/enum-display"
repository = "https://github.com/SeedyROM/enum-display"

[dependencies]
enum-display-macro = { path = "./enum-display-macro" }
enum-display-macro = { version = "0.1.5", path = "./enum-display-macro" }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had no idea you can use both version and path at the same time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants