Making Rust diffs easier for LLMs to read
Rust code changes can become noisy when an LLM is used to review or edit them. Rust often keeps tests inside the same source files as the main code, so tools like Codex may have to read many extra lines that are not the core change. A patch for difft adds a `--min` option to reduce that noise.
The option hides test-only code marked with `#[cfg(test)]`, hides `use` lines, and hides some enum, , and struct renames from the diff output. The patch was made with Codex, with a clear warning that code quality, speed, and support for languages beyond Rust were not priorities.
Key points
- Rust diffs can be long because tests often live inside source files.
- Long diffs can make an LLM focus on less important changes.
- The proposed difft `--min` option hides test code, `use` lines, and some renames.
- Codex was used to create the patch, but the result is not presented as -quality.
- what an sees can be a real improvement.