Compare commits

..

No commits in common. "main" and "0.19.0" have entirely different histories.
main ... 0.19.0

4 changed files with 5 additions and 25 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "ggemini"
version = "0.20.1"
version = "0.19.0"
edition = "2024"
license = "MIT"
readme = "README.md"

View file

@ -33,10 +33,10 @@ pub fn from_stream_async(
size.total += bytes.len();
on_chunk(bytes.clone(), size.total);
if let Some(limit) = size.limit
&& size.total > limit
{
return on_complete(Err(Error::BytesTotal(size.total, limit)));
if let Some(limit) = size.limit {
if size.total > limit {
return on_complete(Err(Error::BytesTotal(size.total, limit)));
}
}
if bytes.is_empty() {

View file

@ -5,13 +5,3 @@ pub struct Size {
pub limit: Option<usize>,
pub total: usize,
}
impl Default for Size {
fn default() -> Self {
Self {
chunk: 0x10000, // 64KB
limit: None,
total: 0,
}
}
}

View file

@ -4,13 +4,3 @@ pub struct Size {
pub limit: usize,
pub total: usize,
}
impl Default for Size {
fn default() -> Self {
Self {
chunk: 0x10000, // 64KB
limit: 0xfffff, // 1 MB
total: 0,
}
}
}