X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/188b1ec1b8528e2326791feccc8077e15bd60182..86202b038253b678e6e11a4c4758fe1c24592ae1:/workspace/src/part11.rs?ds=inline diff --git a/workspace/src/part11.rs b/workspace/src/part11.rs index ac19371..746aed9 100644 --- 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) { - 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`