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

refactor(ast): reduce #[cfg_attr] boilerplate in AST type defs #4375

Commits on Jul 20, 2024

  1. refactor(ast): reduce #[cfg_attr] boilerplate in AST type defs (#4375)

    Remove a ton of `#[cfg_attr(feature = "serialize", serde(...))]` boilerplate from AST type definitions.
    
    Before: `#[cfg_attr(feature = "serialize", serde(flatten))]`
    After: `#[serde(flatten)]`
    
    This is a reprise of #2669, which was later reverted, but this time doing it using our existing zero-cost `#[ast]` dummy macro attr, so no compile time penalty this time around.
    
    This makes no difference to either runtime or compile time behavior, purely removes the `cfg_attr` boilerplate and makes the code easier to read.
    overlookmotel committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    abfccbd View commit details
    Browse the repository at this point in the history