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

Suppress two clippy false-positives which are only valid when some features are disabled #2791

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rhysd
Copy link
Contributor

@rhysd rhysd commented Feb 6, 2025

This PR suppresses two false-positives from clippy.

  • clippy complains about not using #[default] for Theme enum but it is only valid when auto-detect-theme feature is disabled.
    warning: this `impl` can be derived
       --> core/src/theme.rs:165:1
        |
    165 | / impl Default for Theme {
    166 | |     fn default() -> Self {
    167 | |         #[cfg(feature = "auto-detect-theme")]
    168 | |         {
    ...   |
    187 | |     }
    188 | | }
        | |_^
    
  • clippy complains about constructing a unit tuple with default() constructor but it is only valid when both image and svg features are disabled.
    warning: use of `default` to create a unit struct
       --> wgpu/src/layer.rs:290:33
        |
    290 |             images: image::Batch::default(),
        |                                 ^^^^^^^^^^^ help: remove this call to `default`
        |
    

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.

1 participant