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 or suppress pedantic clippy warnings #127

Merged
merged 3 commits into from Jul 16, 2023

Conversation

vbrandl
Copy link
Contributor

@vbrandl vbrandl commented Jun 13, 2023

Two lints will fail if clippy::pedantic is enabled:

error: used binding `_ructe_out_` which is prefixed with an underscore. A leading underscore signals that a binding will not be used

After the discussion in #126, I opted for #[allow(clippy::used_underscore_binding)] where _ructe_out_ is defined, as to not break any existing code

error: this method could have a `#[must_use]` attribute
  --> <snip>/out/templates/statics.rs:18:5
   |
18 |     pub fn get(name: &str) -> Option<&'static Self> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn get(name: &str) -> Option<&'static Self>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
   = note: `-D clippy::must-use-candidate` implied by `-D clippy::pedantic`
this is fixed by adding the `#[must_use]` attribute to the generated code

Fixes #126

@kaj kaj self-requested a review June 20, 2023 09:48
@vbrandl
Copy link
Contributor Author

vbrandl commented Jul 12, 2023

Did you have time to review this? What are your thoughts?

@kaj
Copy link
Owner

kaj commented Jul 15, 2023

Thanks! Yes, this looks good, though one change is is conflict (actually kinds of duplicates) a change that was part of another PR i just merged. I'll resolve that ...

Copy link
Owner

@kaj kaj left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@kaj kaj merged commit c36dd93 into kaj:master Jul 16, 2023
27 checks passed
kaj added a commit that referenced this pull request Jul 16, 2023
kaj added a commit that referenced this pull request Jul 22, 2023
* Added a check that no more than one of the http-types, mime02, or
  mime03 features are enabled (PR #124).  Thanks @rustafarian-dev.
* Changed the writer type from `W: &mut Write` to just `W: Write` (PR #125).
  Thanks @kornelski!
* Fixed handling of `MULTI_WORD_CONSTANTS` in templates (Issue #129, PR #130).
  Thanks @wezm!
* More ways to create a working rust symbol name from a "strange"
  static file name.  Illegal characters are replaced by `_`, and if
  the file name starts with a number it is prefixed with `n` (Issue
  #82, PR #132).  Thanks @Aedius for reporting!
* Fixed more clippy lints (PR #123, #127).  Thanks @vbrandl!
* Updated `rsass` to 0.28.0 and `itertools` to 0.11.0.
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.

Suppress or fix clippy pedantic lints
2 participants