Location: crates/diffguard/src/main.rs:954
Problem: fn cmd_doctor(args: DoctorArgs) -> Result<i32> — clippy pedantic warns this is an unnecessary wrap. Every caller of ? on this function would always get Ok. The function never returns Err.
Fix: Change return type to Ok<i32> (still wraps Ok, just no Err variant needed), or change to -> i32 and use Ok(0)/Ok(1) explicitly, or add #[allow(clippy::unnecessary_wraps)] if there is a structural reason (e.g., future-proofing for multi-check refactor).
This is a legitimate API design issue — a function that can never fail should not pretend it might.
Location: crates/diffguard/src/main.rs:954
Problem:
fn cmd_doctor(args: DoctorArgs) -> Result<i32>— clippy pedantic warns this is an unnecessary wrap. Every caller of?on this function would always getOk. The function never returnsErr.Fix: Change return type to
Ok<i32>(still wraps Ok, just no Err variant needed), or change to-> i32and useOk(0)/Ok(1)explicitly, or add#[allow(clippy::unnecessary_wraps)]if there is a structural reason (e.g., future-proofing for multi-check refactor).This is a legitimate API design issue — a function that can never fail should not pretend it might.