Fix panic message

This commit is contained in:
Michael Mueller 2019-06-19 20:32:57 +02:00
parent 70a2e612bc
commit b1bd7950d9
No known key found for this signature in database
GPG Key ID: 95756F716F423159
1 changed files with 6 additions and 2 deletions

View File

@ -17,12 +17,16 @@ impl<T> MyRefCell<T> {
/// Borrow a `MyRef` to the inner value.
pub fn borrow(&self) -> ::MyRef<T> {
self.0.lock().expect("bar")
self.0
.lock()
.expect("failed to acquire lock while trying to borrow")
}
/// Borrow a mutable `MyRef` to the inner value.
pub fn borrow_mut(&self) -> ::MyRef<T> {
self.0.lock().expect("bar")
self.0
.lock()
.expect("failed to acquire lock while trying to borrow mutably")
}
}