Skip to content

cargo mutants failed if diff contains only file movesΒ #580

@eirnym

Description

@eirnym

I've moved a module from tests folder to another place and cargo mutants failed to understand the diff file. Diff file was generated by git diff main...HEAD command.

backtrace recorded:

   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: patch::parser::parse_multiple_patches
   3: patch::ast::Patch::from_multiple
   4: cargo_mutants::in_diff::diff_filter_file
   5: cargo_mutants::main

Relative part of the diff:

diff --git a/tests/test-utils/Cargo.toml b/test-utils/Cargo.toml
similarity index 100%
rename from tests/test-utils/Cargo.toml
rename to test-utils/Cargo.toml
diff --git a/tests/test-utils/src/io.rs b/test-utils/src/io.rs
similarity index 100%
rename from tests/test-utils/src/io.rs
rename to test-utils/src/io.rs
diff --git a/tests/test-utils/src/lib.rs b/test-utils/src/lib.rs
similarity index 100%
rename from tests/test-utils/src/lib.rs
rename to test-utils/src/lib.rs
diff --git a/tests/test-utils/src/read.rs b/test-utils/src/read.rs
similarity index 100%
rename from tests/test-utils/src/read.rs
rename to test-utils/src/read.rs
diff --git a/tests/test-utils/src/write.rs b/test-utils/src/write.rs
similarity index 100%
rename from tests/test-utils/src/write.rs
rename to test-utils/src/write.rs

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