summaryrefslogtreecommitdiff
path: root/src/rwlock/read_lock.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rwlock/read_lock.rs')
-rw-r--r--src/rwlock/read_lock.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rwlock/read_lock.rs b/src/rwlock/read_lock.rs
index 5ac0bbb..5dd83a7 100644
--- a/src/rwlock/read_lock.rs
+++ b/src/rwlock/read_lock.rs
@@ -34,6 +34,7 @@ unsafe impl<T: Send, R: RawRwLock + Send + Sync> Sharable for ReadLock<'_, T, R>
}
#[mutants::skip]
+#[cfg(not(tarpaulin_include))]
impl<T: ?Sized + Debug, R: RawRwLock> Debug for ReadLock<'_, T, R> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
// safety: this is just a try lock, and the value is dropped
@@ -108,7 +109,7 @@ impl<T: ?Sized, R: RawRwLock> ReadLock<'_, T, R> {
/// use happylock::rwlock::ReadLock;
///
/// let key = ThreadKey::get().unwrap();
- /// let lock: &'static mut RwLock<_> = Box::leak(Box::new(RwLock::new(1)));
+ /// let lock: RwLock<_> = RwLock::new(1);
/// let reader = ReadLock::new(&lock);
///
/// let n = reader.lock(key);