From 7a0ab6ffa99533bc241c88b8761fb82d795dc832 Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Wed, 21 Aug 2024 10:30:46 -0400 Subject: Add progress context to load APIs --- rust/src/update.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'rust/src/update.rs') diff --git a/rust/src/update.rs b/rust/src/update.rs index 026316f5..31e02cd8 100644 --- a/rust/src/update.rs +++ b/rust/src/update.rs @@ -100,7 +100,7 @@ impl UpdateChannel { mut progress: F, ) -> Result where - F: FnMut(u64, u64) -> bool, + F: FnMut(usize, usize) -> bool, { let mut errors = ptr::null_mut(); let result = unsafe { @@ -142,7 +142,7 @@ impl UpdateChannel { mut progress: F, ) -> Result where - F: FnMut(u64, u64) -> bool, + F: FnMut(usize, usize) -> bool, { let mut errors = ptr::null_mut(); let result = unsafe { @@ -256,16 +256,16 @@ pub fn updates_checked() { unsafe extern "C" fn cb_progress_nop( _ctxt: *mut ::std::os::raw::c_void, - _progress: u64, - _total: u64, + _progress: usize, + _total: usize, ) -> bool { true } -unsafe extern "C" fn cb_progress bool>( +unsafe extern "C" fn cb_progress bool>( ctxt: *mut ::std::os::raw::c_void, - progress: u64, - total: u64, + progress: usize, + total: usize, ) -> bool { let ctxt: &mut F = &mut *(ctxt as *mut F); ctxt(progress, total) -- cgit v1.3.1