From 4ab83702e9bb76110a87c8eef901287f5fc07c5f Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 29 Oct 2024 16:33:32 +0200 Subject: [PATCH] use reference without copy usize --- src/gio/memory_input_stream.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gio/memory_input_stream.rs b/src/gio/memory_input_stream.rs index 202c3a2..46d8b6e 100644 --- a/src/gio/memory_input_stream.rs +++ b/src/gio/memory_input_stream.rs @@ -34,7 +34,7 @@ pub fn from_socket_connection_async( priority: Priority, bytes_in_chunk: usize, bytes_total_limit: usize, - on_chunk: Option, + on_chunk: Option, on_complete: Option)>) + 'static>, ) { read_all_from_socket_connection_async( @@ -82,7 +82,7 @@ pub fn read_all_from_socket_connection_async( bytes_in_chunk: usize, bytes_total_limit: usize, bytes_total: usize, - on_chunk: Option, + on_chunk: Option, on_complete: Option)>) + 'static>, ) { socket_connection.input_stream().read_bytes_async( @@ -96,7 +96,7 @@ pub fn read_all_from_socket_connection_async( // Callback chunk function if let Some(ref callback) = on_chunk { - callback((&bytes, bytes_total)); + callback((&bytes, &bytes_total)); } // Validate max size