Skip to content
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

Convert usize into Exprs, add option to rename context #65

Merged
merged 3 commits into from
Aug 25, 2023

Conversation

aumetra
Copy link
Contributor

@aumetra aumetra commented Aug 24, 2023

This PR does the following things:

  • Remove the usize requirement from length and byte_length, enabling arithmetic rules
  • Add an option to name the context via an as expression inside the context attribute (like so #[garde(context(Context as ctx))]

Never really wrote proc-macro code before so hopefully it's not too messy.

@aumetra aumetra marked this pull request as draft August 24, 2023 23:31
@aumetra
Copy link
Contributor Author

aumetra commented Aug 24, 2023

Never mind, the last commit was incredibly broken. Lemme see if I can fix that up

@aumetra aumetra marked this pull request as ready for review August 24, 2023 23:50
@jprochazk
Copy link
Owner

pinned failed due to clap changing its msrv, i'll downgrade it on main

Copy link
Owner

@jprochazk jprochazk left a comment

Choose a reason for hiding this comment

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

🥇

@@ -1,7 +1,10 @@
use super::util;

const UWU: usize = 101;
Copy link
Owner

Choose a reason for hiding this comment

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

pain

Copy link
Contributor Author

Choose a reason for hiding this comment

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

HEY we need some tests and I'm not good with naming stuff

@jprochazk jprochazk merged commit 868d966 into jprochazk:main Aug 25, 2023
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.

2 participants