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

fix clippy warnings for sources #2745

Merged
merged 3 commits into from
Jan 23, 2023

Commits on Jan 23, 2023

  1. sources: fix clippy warnings

    Adopt the fixes suggested by clippy in most cases.
    
    Disable pedantic warnings for the update metadata crate after fixing
    several. The intent seems to have been to hold the updater code to an
    especially high bar, but in practice it creates a higher maintenance
    burden when updating Rust, and requires changes in mission-critical
    code for merely stylistic reasons.
    
    Signed-off-by: Ben Cressey <[email protected]>
    bcressey committed Jan 23, 2023
    Configuration menu
    Copy the full SHA
    d12f867 View commit details
    Browse the repository at this point in the history
  2. sources: box certain sources in error enums

    Apply snafu annotations to box the error types most often flagged by
    the `clippy::result_large_err` lint, which complains whenever the Err
    part of a Result is greater than or equal to 128 bytes.
    
    This is most common for errors with several String fields, since each
    String occupies 24 bytes.
    
    That includes:
    * apiclient::Error
    * datastore::Error
    * tough:error::Error
    * handlebars::RenderError
    
    Also box a few larger types, like `semver::Version`, and use a Vec
    instead of an array for `PartitionSet`.
    
    Signed-off-by: Ben Cressey <[email protected]>
    bcressey committed Jan 23, 2023
    Configuration menu
    Copy the full SHA
    e9b6ea2 View commit details
    Browse the repository at this point in the history
  3. build: check clippy lints for sources

    Signed-off-by: Ben Cressey <[email protected]>
    bcressey committed Jan 23, 2023
    Configuration menu
    Copy the full SHA
    f14bbeb View commit details
    Browse the repository at this point in the history