From 9345b5caaa8e355a9f3058cee32ab03374b706b3 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Tue, 10 Nov 2026 18:54:55 -0500 Subject: [PATCH] cos: drop the second decoded_strict_within that #6046 merged in (#6933) main fails to compile (E0592): the merge of #6046 added Stream::decoded_strict_within next to the one already there. Both decode the whole chain bounded by max and map the error to CosError::Filter; the earlier one stays, with #6046's test. --- crates/cos/src/object.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/crates/cos/src/object.rs b/crates/cos/src/object.rs index 48a23c4af2..5d121dc41e 100644 --- a/crates/cos/src/object.rs +++ b/crates/cos/src/object.rs @@ -453,12 +453,6 @@ impl Stream { self.decode_chain(max, decode).map(|(v, _)| v).map_err(|(e, _)| CosError::Filter(e.to_string())) } - /// [`Stream::decoded_strict`] for a caller with less than [`MAX_DECODED`] left to spend: - /// decoding past `max` bytes (in any filter stage) is an error. - pub fn decoded_strict_within(&self, max: usize) -> Result, CosError> { - self.decoded_strict_within_counted(max).map(|(v, _)| v).map_err(|(e, _)| CosError::Filter(e.to_string())) - } - /// [`Stream::decoded_strict`] bounded by `max` and counted like /// [`Stream::decoded_within_counted`]. pub(crate) fn decoded_strict_within_counted(&self, max: usize) -> Result<(Vec, usize), (pdfcraft_filters::FilterError, usize)> {