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

Use the new parsing utils #296

Merged
merged 8 commits into from
Aug 22, 2023
Merged

Conversation

MegaBluejay
Copy link
Contributor

@MegaBluejay MegaBluejay commented Aug 18, 2023

First suggested here

Synopsis

There's some repetition around parsing the same attributes in different derives

Solution

Refactor Into, From, and Debug derives to use the skip and forward attribute parsing utils

Checklist

  • Documentation is updated (if required)
  • Tests are added/updated (if required)
  • CHANGELOG entry is added (if required)

@MegaBluejay MegaBluejay marked this pull request as ready for review August 21, 2023 11:24
@@ -1385,6 +1397,31 @@ pub(crate) mod skip {
/// ```
pub(crate) struct Attribute(&'static str);

impl Attribute {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@MegaBluejay why as a separate impl Attribute block? There is one already down bellow.

@@ -1385,6 +1397,31 @@ pub(crate) mod skip {
/// ```
pub(crate) struct Attribute(&'static str);

impl Attribute {
pub(crate) fn parse_attrs(
Copy link
Collaborator

Choose a reason for hiding this comment

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

@MegaBluejay why without docs, again?

impl/src/utils.rs Outdated Show resolved Hide resolved
@tyranron tyranron added this to the 1.0.0 milestone Aug 22, 2023
@tyranron tyranron added the docs label Aug 22, 2023
@tyranron tyranron merged commit 541ecf8 into JelteF:master Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants