Merge pull request #2068 from jkczyz/2023-03-doc-fixes
[rust-lightning] / lightning / src / sync / debug_sync.rs
index 7ea1693b87095260cc6251f256caf0c4790610ff..11824d5bc73182ebf3d77fc53dd7a53b2be59045 100644 (file)
@@ -201,6 +201,11 @@ pub struct Mutex<T: Sized> {
        inner: StdMutex<T>,
        deps: Arc<LockMetadata>,
 }
+impl<T: Sized> Mutex<T> {
+       pub(crate) fn into_inner(self) -> LockResult<T> {
+               self.inner.into_inner().map_err(|_| ())
+       }
+}
 
 #[must_use = "if unused the Mutex will immediately unlock"]
 pub struct MutexGuard<'a, T: Sized + 'a> {