mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 03:11:24 +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!(
|
tracing::debug!(
|
||||||
"BytesStream with {} chunks, avg length {}",
|
"BytesStream with {} chunks, avg length {}",
|
||||||
bs.chunks_len(),
|
bs.chunks_len(),
|
||||||
bs.len() / bs.chunks_len()
|
bs.len() / bs.chunks_len().max(1)
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(bs)
|
Ok(bs)
|
||||||
|
|
Loading…
Reference in a new issue