diff options
| author | Josh Ferrell <josh@vector35.com> | 2024-08-21 10:30:46 -0400 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2024-08-21 10:30:46 -0400 |
| commit | 7a0ab6ffa99533bc241c88b8761fb82d795dc832 (patch) | |
| tree | 32d3cc8339f681f9a1755fb36a2c69580af42042 /rust/src/update.rs | |
| parent | 3d088d6dae28ab851b584a11678c9993eb18da10 (diff) | |
Add progress context to load APIs
Diffstat (limited to 'rust/src/update.rs')
| -rw-r--r-- | rust/src/update.rs | 14 |
1 files changed, 7 insertions, 7 deletions
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<UpdateResult, BnString> 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<UpdateResult, BnString> 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<F: FnMut(u64, u64) -> bool>( +unsafe extern "C" fn cb_progress<F: FnMut(usize, usize) -> 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) |
