Our summary
Two pieces of code can look alike without doing the same job. Oleksandr Prokhorenko shows how cargo-crap, a tool for checking Rust programs, first finds similar functions. An optional Jev check then helps a developer decide which pairs deserve a closer look.
The tool sends both functions and their similarity score to Jev, an outside AI service, and asks three separate questions: what they share, whether merging would help, and whether a bug fix might miss one copy. It saves the answers for unchanged code and labels uncertain results rather than naming a confident verdict.
This is advice, not an automatic rewrite or a reason for a build to fail. Jev cannot see the callers or the code's history, and it never sees pairs the first search misses. Teams must opt in to sending their code; a failed request discards the whole AI review.
Key takeaways
- Separate shared logic from a shared writing pattern before deciding to merge code.
- Save judgments with the code, model and questions so changes cannot silently reuse old advice.
- Keep uncertain or incomplete advice from looking like a finished review.