diff --git a/Cargo.toml b/Cargo.toml index 801fb2e..901e1b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ggemini" -version = "0.20.1" +version = "0.19.0" edition = "2024" license = "MIT" readme = "README.md" diff --git a/src/gio/file_output_stream.rs b/src/gio/file_output_stream.rs index 2dffb5e..777600f 100644 --- a/src/gio/file_output_stream.rs +++ b/src/gio/file_output_stream.rs @@ -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() { diff --git a/src/gio/file_output_stream/size.rs b/src/gio/file_output_stream/size.rs index 5d0c911..285d9f1 100644 --- a/src/gio/file_output_stream/size.rs +++ b/src/gio/file_output_stream/size.rs @@ -5,13 +5,3 @@ pub struct Size { pub limit: Option, pub total: usize, } - -impl Default for Size { - fn default() -> Self { - Self { - chunk: 0x10000, // 64KB - limit: None, - total: 0, - } - } -} diff --git a/src/gio/memory_input_stream/size.rs b/src/gio/memory_input_stream/size.rs index 9a10bd3..b95ef39 100644 --- a/src/gio/memory_input_stream/size.rs +++ b/src/gio/memory_input_stream/size.rs @@ -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, - } - } -}