We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9538e0c commit 6ef5577Copy full SHA for 6ef5577
zlib-rs/src/deflate.rs
@@ -2384,9 +2384,10 @@ fn zng_tr_flush_block(
2384
* successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
2385
* transform a block into a stored block.
2386
*/
2387
- let window_offset = window_offset.unwrap();
2388
- let range = window_offset..window_offset + stored_len as usize;
2389
- zng_tr_stored_block(state, range, last);
+ if let Some(window_offset) = window_offset {
+ let range = window_offset..window_offset + stored_len as usize;
+ zng_tr_stored_block(state, range, last);
2390
+ }
2391
} else if static_lenb == opt_lenb {
2392
state.bit_writer.emit_tree(BlockType::StaticTrees, last);
2393
state.compress_block_static_trees();
0 commit comments