Skip to content

diff_builder_property_tests.rs:17: unused import of DiffBuilder — dead code in test module #1595

Description

@EffortlessSteven

Location: crates/diffguard-testkit/src/diff_builder_property_tests.rs:17

Clippy: unused_imports

Issue: The import use crate::diff_builder::DiffBuilder; is present but never used in the property tests module. Clippy suggests this may be a test module that should be annotated with #[cfg(test)], or the import is simply dead code.

warning: unused import: `crate::diff_builder::DiffBuilder`
  --> crates/diffguard-testkit/src/diff_builder_property_tests.rs:17:5
   |
17 | use crate::diff_builder::DiffBuilder;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: if this is a test module, consider adding a `#[cfg(test)]` to the containing module
  --> crates/diffguard-testkit/src/lib.rs:25:1
   |
25 | pub mod diff_builder_property_tests;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Suggested fix: Either:

  1. Add #[cfg(test)] to the module in lib.rs if property tests are only meant to run in test mode, OR
  2. Remove the unused import if DiffBuilder is not actually needed in this module

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions