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] [package]
name = "ggemini" name = "ggemini"
version = "0.20.1" version = "0.19.0"
edition = "2024" edition = "2024"
license = "MIT" license = "MIT"
readme = "README.md" readme = "README.md"

View file

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

View file

@ -5,13 +5,3 @@ pub struct Size {
pub limit: Option<usize>, pub limit: Option<usize>,
pub total: 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 limit: usize,
pub total: usize, pub total: usize,
} }
impl Default for Size {
fn default() -> Self {
Self {
chunk: 0x10000, // 64KB
limit: 0xfffff, // 1 MB
total: 0,
}
}
}