Checks for calls to RefCell::borrow_mut that could be calls to RefCell::borrow.
A call to RefCell::borrow_mut “panics if the value is currently borrowed.” Thus, a call
to RefCell::borrow_mut can panic in situations where a call to RefCell::borrow would
not.
x = *cell.borrow_mut();
Use instead:
x = *cell.borrow();