From 3cb2a39dc3fc261883a0e23af69739e2ac5d2965 Mon Sep 17 00:00:00 2001 From: Grzegorz Martens Date: Mon, 2 Nov 2026 19:31:14 +0100 Subject: [PATCH] M8: the redact README says a refused remove_hidden has changed the document The README said apply "refuses and changes nothing" and that remove_hidden takes the dictionaries out "the same way", which reads as if a refused remove_hidden changed nothing too. It has changed the document by then (a_refused_removal_of_hidden_information_doesnt_say_nothing_changed: the comment goes before the refusal), as its doc says, so a caller passes a copy it can drop. Raised by CodeRabbit on #5698. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY --- crates/redact/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/redact/README.md b/crates/redact/README.md index 698e23c131..a521f0867e 100644 --- a/crates/redact/README.md +++ b/crates/redact/README.md @@ -31,7 +31,8 @@ clear_marks(&mut doc, None)?; // remove marks without app space is known to have more than one component, it has no size or one past what redaction clears, its data is in another file, or it can't be decoded), or something else refers to them, `apply` refuses and changes nothing (`RedactError::SharedJbig2Globals`). `remove_hidden` takes them out - the same way. Another dictionary holding the same shapes in other bytes isn't found, nor is a copy + the same way, but it has changed the document by the time it refuses: a caller passes a copy it + can drop. Another dictionary holding the same shapes in other bytes isn't found, nor is a copy nothing names, and an image that hasn't left keeps its globals with its pixels: one another page still draws, or one something that doesn't draw it still refers to. Finding what to store again reads each object at most once for each way it is read (a `/JBIG2Globals` chain named part way,