Slug: own-fn-05 · Paired reading: Chapter 5
Prompt
Implement Lock with lock(&self) -> Guard<'_> that sets an interior
Cell<bool> flag, and Guard that clears it on Drop. fn with_lock
takes the lock, runs a closure, and relies on drop for release — no
manual unlock call.