v0.2.2 - fix #3

This commit is contained in:
minish 2024-06-08 02:03:51 -04:00
parent 7a3b8a66e2
commit 51c4b72626
Signed by: min
GPG Key ID: FEECFF24EF0CE9E9
3 changed files with 6 additions and 6 deletions

2
Cargo.lock generated
View File

@ -246,7 +246,7 @@ checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1"
[[package]] [[package]]
name = "breeze" name = "breeze"
version = "0.2.1" version = "0.2.2"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-recursion", "async-recursion",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "breeze" name = "breeze"
version = "0.2.1" version = "0.2.2"
edition = "2021" edition = "2021"
[dependencies] [dependencies]

View File

@ -170,7 +170,7 @@ impl Engine {
mut stream: BodyDataStream, mut stream: BodyDataStream,
lifetime: Option<Duration>, lifetime: Option<Duration>,
keep_exif: bool, keep_exif: bool,
) -> Result<(), axum::Error> { ) -> Result<(), anyhow::Error> {
// if we're using cache, make some space to store the upload in // if we're using cache, make some space to store the upload in
let mut data = if use_cache { let mut data = if use_cache {
BytesMut::with_capacity(provided_len) BytesMut::with_capacity(provided_len)
@ -208,7 +208,7 @@ impl Engine {
if !coalesce_and_strip { if !coalesce_and_strip {
if let Some(ref tx) = tx { if let Some(ref tx) = tx {
debug!("sending chunk to i/o task"); debug!("sending chunk to i/o task");
let _ = tx.send(chunk.clone()).await; tx.send(chunk.clone()).await?;
} }
} }
@ -250,7 +250,7 @@ impl Engine {
// send what we did over to the i/o task, all in one chunk // send what we did over to the i/o task, all in one chunk
if let Some(ref tx) = tx { if let Some(ref tx) = tx {
debug!("sending filled buffer to i/o task"); debug!("sending filled buffer to i/o task");
let _ = tx.send(data.clone()).await; tx.send(data.clone()).await?;
} }
data data
@ -284,7 +284,7 @@ impl Engine {
stream: BodyDataStream, stream: BodyDataStream,
lifetime: Option<Duration>, lifetime: Option<Duration>,
keep_exif: bool, keep_exif: bool,
) -> Result<ProcessOutcome, axum::Error> { ) -> Result<ProcessOutcome, anyhow::Error> {
// if the upload size is smaller than the specified maximum, we use the cache! // if the upload size is smaller than the specified maximum, we use the cache!
let use_cache: bool = self.cache.will_use(provided_len); let use_cache: bool = self.cache.will_use(provided_len);