Skip to content

Commit

Permalink
remove extra tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
yggverse committed Dec 9, 2024
1 parent eb32db3 commit f33e53e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/gio/file_output_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub fn move_all_from_stream_async(
usize, // bytes_total
),
callback: (
impl Fn((Bytes, usize)) + 'static, // on_chunk
impl Fn(Bytes, usize) + 'static, // on_chunk
impl FnOnce(Result<FileOutputStream, Error>) + 'static, // on_complete
),
) {
Expand All @@ -38,7 +38,7 @@ pub fn move_all_from_stream_async(
let bytes_total = bytes_total + bytes.len();

// Callback chunk function
on_chunk((bytes.clone(), bytes_total));
on_chunk(bytes.clone(), bytes_total);

// Validate max size
if let Some(bytes_total_limit) = bytes_total_limit {
Expand Down
6 changes: 3 additions & 3 deletions src/gio/memory_input_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn from_stream_async(
priority: Priority,
bytes_in_chunk: 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,
) {
move_all_from_stream_async(
Expand All @@ -46,7 +46,7 @@ pub fn move_all_from_stream_async(
usize, // bytes_total
),
callback: (
impl Fn((Bytes, usize)) + 'static, // on_chunk
impl Fn(Bytes, usize) + 'static, // on_chunk
impl FnOnce(Result<MemoryInputStream, Error>) + 'static, // on_complete
),
) {
Expand All @@ -63,7 +63,7 @@ pub fn move_all_from_stream_async(
let bytes_total = bytes_total + bytes.len();

// Callback chunk function
on_chunk((bytes.clone(), bytes_total));
on_chunk(bytes.clone(), bytes_total);

// Validate max size
if bytes_total > bytes_total_limit {
Expand Down

0 comments on commit f33e53e

Please sign in to comment.