projects
/
rust-101.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
finish part 14
[rust-101.git]
/
workspace
/
src
/
part11.rs
diff --git
a/workspace/src/part11.rs
b/workspace/src/part11.rs
index 7e45540ca74e98229462d35ae07c71ea2b73e516..cc2a2524dcc0233c77cbb1ac7e0cd6899223d807 100644
(file)
--- a/
workspace/src/part11.rs
+++ b/
workspace/src/part11.rs
@@
-41,7
+41,10
@@
mod callbacks {
c.call(0);
let mut count: usize = 0;
c.call(0);
let mut count: usize = 0;
- c.register(Box::new(move |val| { count = count+1; println!("Callback 2, {}. time: {}", count, val); } ));
+ c.register(Box::new(move |val| {
+ count = count+1;
+ println!("Callback 2, {}. time: {}", count, val);
+ } ));
c.call(1); c.call(2);
}
}
c.call(1); c.call(2);
}
}