projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Further simplify the `outbound_payments` failure macro
[rust-lightning]
/
lightning
/
src
/
sync
/
debug_sync.rs
diff --git
a/lightning/src/sync/debug_sync.rs
b/lightning/src/sync/debug_sync.rs
index 7ea1693b87095260cc6251f256caf0c4790610ff..11824d5bc73182ebf3d77fc53dd7a53b2be59045 100644
(file)
--- a/
lightning/src/sync/debug_sync.rs
+++ b/
lightning/src/sync/debug_sync.rs
@@
-201,6
+201,11
@@
pub struct Mutex<T: Sized> {
inner: StdMutex<T>,
deps: Arc<LockMetadata>,
}
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> {
#[must_use = "if unused the Mutex will immediately unlock"]
pub struct MutexGuard<'a, T: Sized + 'a> {