on_progress takes u64.

This commit is contained in:
Stephen Chung
2020-12-12 10:10:27 +08:00
parent bed29da71a
commit 4438c358d5
6 changed files with 32 additions and 18 deletions

View File

@@ -1726,7 +1726,7 @@ impl Engine {
///
/// let mut engine = Engine::new();
///
/// engine.on_progress(move |&ops| {
/// engine.on_progress(move |ops| {
/// if ops > 10000 {
/// Some("Over 10,000 operations!".into())
/// } else if ops % 800 == 0 {
@@ -1748,7 +1748,7 @@ impl Engine {
#[inline(always)]
pub fn on_progress(
&mut self,
callback: impl Fn(&u64) -> Option<Dynamic> + SendSync + 'static,
callback: impl Fn(u64) -> Option<Dynamic> + SendSync + 'static,
) -> &mut Self {
self.progress = Some(Box::new(callback));
self