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

Only generate ValidationError when needed #203

Closed
wants to merge 3 commits into from

Commits on Apr 1, 2021

  1. Only generate ValidationError when needed

    Custom validation errors are converted to strings if the deriving struct
    doesn't specify a type for the errors returned by the `build` method.
    This variant was generated even when it wasn't needed, resulting in a
    reference to `String` that broke no_std.
    
    This change only emits that variant when `build_fn(validate = "...")` is
    set **and** `build_fn(error = "...")` is not set. This means no_std will
    work in the simple case with no additional meta items needed.
    
    Fixes #201
    TedDriggs committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    a225632 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b6c3641 View commit details
    Browse the repository at this point in the history
  3. Remove trailing whitespace

    rust-analyzer didn't touch trailing whitespace in a macro,
    which caused rustfmt to bail out.
    TedDriggs committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    e597998 View commit details
    Browse the repository at this point in the history