mirror of
https://git.asonix.dog/asonix/pict-rs.git
synced 2024-11-28 04:21:12 +00:00
Prevent divided-by-zero for empty BytesStreams
This commit is contained in:
parent
eca3697410
commit
4021458be8
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ impl BytesStream {
|
|||
tracing::debug!(
|
||||
"BytesStream with {} chunks, avg length {}",
|
||||
bs.chunks_len(),
|
||||
bs.len() / bs.chunks_len()
|
||||
bs.len() / bs.chunks_len().max(1)
|
||||
);
|
||||
|
||||
Ok(bs)
|
||||
|
|
Loading…
Reference in a new issue