Skip to content

Replace #![allow(unexpected_cfgs)] with targeted cfg check #21

@Laurc2004

Description

@Laurc2004

Severity: LOW

Problem

src-tauri/src/lib.rs line 1: #![allow(unexpected_cfgs)] suppresses a legitimate Rust compiler warning about unexpected cfg values. This is a blanket suppression that hides all cfg-related warnings, not just the specific one causing noise.

Proposed Solution

Replace the blanket allow with a targeted check. For example, add the expected cfg values to Cargo.toml:

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("macos"))'] }

Or use a more targeted #[allow(unexpected_cfgs)] on the specific item that triggers the warning.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions