mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-11 00:41:21 +00:00
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.
This commit is contained in:
1 parent
ad3e6d4b85
commit
9345b5caaa
1 file changed
-6
@@ -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<Vec<u8>, 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<u8>, usize), (pdfcraft_filters::FilterError, usize)> {
|
||||
|
||||
Reference in new issue
Block a user