X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/1f6a5ed7a44ed00827fd3312503f20b8f52f94db..4b75a1808a0ee75383f81659f6262fefc7047a09:/workspace/src/part12.rs diff --git a/workspace/src/part12.rs b/workspace/src/part12.rs index 23db4f6..86fb4bb 100644 --- a/workspace/src/part12.rs +++ b/workspace/src/part12.rs @@ -103,7 +103,6 @@ fn demo_mut(c: &mut CallbacksMut) { c.call(1); c.clone().call(2); } -// **Exercise 12.1**: Change the type of `call` to ask only for a shared borrow. Then write some piece of code using only the available, public -// interface of `CallbacksMut` such that a reentrant call to `call` is happening, and the program aborts because the `RefCell` refuses to hand -// out a second mutable borrow to its content. +// **Exercise 12.1**: Write some piece of code using only the available, public interface of `CallbacksMut` such that a reentrant call to a closure +// is happening, and the program aborts because the `RefCell` refuses to hand out a second mutable borrow of the closure's environment.