Skip to content

Commit 6ef5577

Browse files
committed
clippy
1 parent 9538e0c commit 6ef5577

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

zlib-rs/src/deflate.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,9 +2384,10 @@ fn zng_tr_flush_block(
23842384
* successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
23852385
* transform a block into a stored block.
23862386
*/
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);
2387+
if let Some(window_offset) = window_offset {
2388+
let range = window_offset..window_offset + stored_len as usize;
2389+
zng_tr_stored_block(state, range, last);
2390+
}
23902391
} else if static_lenb == opt_lenb {
23912392
state.bit_writer.emit_tree(BlockType::StaticTrees, last);
23922393
state.compress_block_static_trees();

0 commit comments

Comments
 (0)