diff --git a/src/lib.rs b/src/lib.rs index 16e0caa..9971246 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -163,7 +163,7 @@ impl MutexId { /// # Panics /// /// This method panics if the new dependency would introduce a cycle. - pub fn get_borrowed(&self) -> BorrowedMutex { + pub fn get_borrowed(&self) -> BorrowedMutex<'_> { self.mark_held(); BorrowedMutex { id: self, diff --git a/src/stdsync/tracing.rs b/src/stdsync/tracing.rs index 2b813af..fe20bce 100644 --- a/src/stdsync/tracing.rs +++ b/src/stdsync/tracing.rs @@ -79,7 +79,7 @@ impl Mutex { /// This method participates in lock dependency tracking. If acquiring this lock introduces a /// dependency cycle, this method will panic. #[track_caller] - pub fn lock(&self) -> LockResult> { + pub fn lock(&self) -> LockResult> { let mutex = self.id.get_borrowed(); let result = self.inner.lock(); @@ -98,7 +98,7 @@ impl Mutex { /// This method participates in lock dependency tracking. If acquiring this lock introduces a /// dependency cycle, this method will panic. #[track_caller] - pub fn try_lock(&self) -> TryLockResult> { + pub fn try_lock(&self) -> TryLockResult> { let mutex = self.id.get_borrowed(); let result = self.inner.try_lock(); @@ -308,7 +308,7 @@ impl RwLock { /// This method participates in lock dependency tracking. If acquiring this lock introduces a /// dependency cycle, this method will panic. #[track_caller] - pub fn read(&self) -> LockResult> { + pub fn read(&self) -> LockResult> { let mutex = self.id.get_borrowed(); let result = self.inner.read(); @@ -325,7 +325,7 @@ impl RwLock { /// This method participates in lock dependency tracking. If acquiring this lock introduces a /// dependency cycle, this method will panic. #[track_caller] - pub fn write(&self) -> LockResult> { + pub fn write(&self) -> LockResult> { let mutex = self.id.get_borrowed(); let result = self.inner.write(); @@ -342,7 +342,7 @@ impl RwLock { /// This method participates in lock dependency tracking. If acquiring this lock introduces a /// dependency cycle, this method will panic. #[track_caller] - pub fn try_read(&self) -> TryLockResult> { + pub fn try_read(&self) -> TryLockResult> { let mutex = self.id.get_borrowed(); let result = self.inner.try_read(); @@ -359,7 +359,7 @@ impl RwLock { /// This method participates in lock dependency tracking. If acquiring this lock introduces a /// dependency cycle, this method will panic. #[track_caller] - pub fn try_write(&self) -> TryLockResult> { + pub fn try_write(&self) -> TryLockResult> { let mutex = self.id.get_borrowed(); let result = self.inner.try_write();