Loading Cargo.lock +1 −0 Original line number Diff line number Diff line Loading @@ -2087,6 +2087,7 @@ dependencies = [ "thiserror", "time", "tokio", "tokio-util", "tower", "tracing", "transform-stream", Loading crates/s3s/Cargo.toml +1 −0 Original line number Diff line number Diff line Loading @@ -70,3 +70,4 @@ crc64fast-nvme = "1.2.0" [dev-dependencies] tokio = { version = "1.40.0", features = ["full"] } tokio-util = { version = "0.7.13", features = ["io"] } crates/s3s/tests/tokio_util.rs 0 → 100644 +11 −0 Original line number Diff line number Diff line use futures::TryStreamExt; use tokio::io::AsyncBufRead; use tokio_util::io::StreamReader; pub fn convert_body(body: s3s::Body) -> impl AsyncBufRead + Send + Sync + 'static { StreamReader::new(body.into_stream().map_err(std::io::Error::other)) } pub fn convert_streaming_blob(blob: s3s::dto::StreamingBlob) -> impl AsyncBufRead + Send + Sync + 'static { StreamReader::new(blob.into_stream().map_err(std::io::Error::other)) } Loading
Cargo.lock +1 −0 Original line number Diff line number Diff line Loading @@ -2087,6 +2087,7 @@ dependencies = [ "thiserror", "time", "tokio", "tokio-util", "tower", "tracing", "transform-stream", Loading
crates/s3s/Cargo.toml +1 −0 Original line number Diff line number Diff line Loading @@ -70,3 +70,4 @@ crc64fast-nvme = "1.2.0" [dev-dependencies] tokio = { version = "1.40.0", features = ["full"] } tokio-util = { version = "0.7.13", features = ["io"] }
crates/s3s/tests/tokio_util.rs 0 → 100644 +11 −0 Original line number Diff line number Diff line use futures::TryStreamExt; use tokio::io::AsyncBufRead; use tokio_util::io::StreamReader; pub fn convert_body(body: s3s::Body) -> impl AsyncBufRead + Send + Sync + 'static { StreamReader::new(body.into_stream().map_err(std::io::Error::other)) } pub fn convert_streaming_blob(blob: s3s::dto::StreamingBlob) -> impl AsyncBufRead + Send + Sync + 'static { StreamReader::new(blob.into_stream().map_err(std::io::Error::other)) }