projects
/
rust-101.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix the patching monkeys
[rust-101.git]
/
workspace
/
src
/
part11.rs
diff --git
a/workspace/src/part11.rs
b/workspace/src/part11.rs
index ac19371db6d69594d87526d5e46d7267f4631de9..746aed9e96398b6b03cc8f033cdeec25764919a2 100644
(file)
--- a/
workspace/src/part11.rs
+++ b/
workspace/src/part11.rs
@@
-23,7
+23,7
@@
impl Callbacks {
// Registration simply stores the callback.
pub fn register(&mut self, callback: Box<FnMut(i32)>) {
// Registration simply stores the callback.
pub fn register(&mut self, callback: Box<FnMut(i32)>) {
- unimplemented!()
+ self.callbacks.push(callback);
}
// We can also write a generic version of `register`, such that it will be instantiated with some concrete closure type `F`
}
// We can also write a generic version of `register`, such that it will be instantiated with some concrete closure type `F`