remove extra tuple

This commit is contained in:
yggverse 2024-12-09 14:33:51 +02:00
parent eb32db3d3b
commit f33e53e51b
2 changed files with 5 additions and 5 deletions

View file

@ -21,7 +21,7 @@ pub fn move_all_from_stream_async(
usize, // bytes_total usize, // bytes_total
), ),
callback: ( callback: (
impl Fn((Bytes, usize)) + 'static, // on_chunk impl Fn(Bytes, usize) + 'static, // on_chunk
impl FnOnce(Result<FileOutputStream, Error>) + 'static, // on_complete impl FnOnce(Result<FileOutputStream, Error>) + 'static, // on_complete
), ),
) { ) {
@ -38,7 +38,7 @@ pub fn move_all_from_stream_async(
let bytes_total = bytes_total + bytes.len(); let bytes_total = bytes_total + bytes.len();
// Callback chunk function // Callback chunk function
on_chunk((bytes.clone(), bytes_total)); on_chunk(bytes.clone(), bytes_total);
// Validate max size // Validate max size
if let Some(bytes_total_limit) = bytes_total_limit { if let Some(bytes_total_limit) = bytes_total_limit {

View file

@ -19,7 +19,7 @@ pub fn from_stream_async(
priority: Priority, priority: Priority,
bytes_in_chunk: usize, bytes_in_chunk: usize,
bytes_total_limit: usize, bytes_total_limit: usize,
on_chunk: impl Fn((Bytes, usize)) + 'static, on_chunk: impl Fn(Bytes, usize) + 'static,
on_complete: impl FnOnce(Result<MemoryInputStream, Error>) + 'static, on_complete: impl FnOnce(Result<MemoryInputStream, Error>) + 'static,
) { ) {
move_all_from_stream_async( move_all_from_stream_async(
@ -46,7 +46,7 @@ pub fn move_all_from_stream_async(
usize, // bytes_total usize, // bytes_total
), ),
callback: ( callback: (
impl Fn((Bytes, usize)) + 'static, // on_chunk impl Fn(Bytes, usize) + 'static, // on_chunk
impl FnOnce(Result<MemoryInputStream, Error>) + 'static, // on_complete impl FnOnce(Result<MemoryInputStream, Error>) + 'static, // on_complete
), ),
) { ) {
@ -63,7 +63,7 @@ pub fn move_all_from_stream_async(
let bytes_total = bytes_total + bytes.len(); let bytes_total = bytes_total + bytes.len();
// Callback chunk function // Callback chunk function
on_chunk((bytes.clone(), bytes_total)); on_chunk(bytes.clone(), bytes_total);
// Validate max size // Validate max size
if bytes_total > bytes_total_limit { if bytes_total > bytes_total_limit {