From 01595fa220cb5557a51712ce6a0a06d747de6d62 Mon Sep 17 00:00:00 2001 From: tupe12334 Date: Wed, 1 Jul 2026 03:05:51 +0300 Subject: [PATCH] chore(lint): enable clippy::map_err_ignore Prevents .map_err(|_| ...) from silently discarding the source error in network, checksum, and archive-extraction paths. Closes #20 --- lib/Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Cargo.toml b/lib/Cargo.toml index b92c17b..865d3d4 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -52,6 +52,12 @@ allow_attributes_without_reason = "deny" string_slice = "deny" # Reject leftover `dbg!` debugging macros so they never ship to production. dbg_macro = "deny" +# Forbid `.map_err(|_| ...)`, which discards the original error and its +# context. Network, filesystem, and archive-extraction failures in an +# installer need their root cause preserved for debugging; require binding +# the error (`.map_err(|e| ...)`) so it can be logged or wrapped instead of +# silently dropped. +map_err_ignore = "deny" # Allow pedantic lints that are too noisy for this codebase missing_errors_doc = "allow" missing_panics_doc = "allow"