mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
Add into_inner methods. (#3110)
This commit is contained in:
@@ -82,6 +82,11 @@ mod mutex_impl {
|
|||||||
|
|
||||||
MutexGuard(self.0.lock(), ptr)
|
MutexGuard(self.0.lock(), ptr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
|
pub fn into_inner(self) -> T {
|
||||||
|
self.0.into_inner()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> Drop for MutexGuard<'_, T> {
|
impl<T> Drop for MutexGuard<'_, T> {
|
||||||
@@ -314,6 +319,11 @@ mod rw_lock_impl {
|
|||||||
holders: Arc::clone(&self.holders),
|
holders: Arc::clone(&self.holders),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
|
pub fn into_inner(self) -> T {
|
||||||
|
self.lock.into_inner()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn make_backtrace() -> backtrace::Backtrace {
|
fn make_backtrace() -> backtrace::Backtrace {
|
||||||
@@ -366,6 +376,11 @@ mod mutex_impl {
|
|||||||
pub fn lock(&self) -> MutexGuard<'_, T> {
|
pub fn lock(&self) -> MutexGuard<'_, T> {
|
||||||
self.0.borrow_mut()
|
self.0.borrow_mut()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
|
pub fn into_inner(self) -> T {
|
||||||
|
self.0.into_inner()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -401,6 +416,11 @@ mod rw_lock_impl {
|
|||||||
pub fn write(&self) -> RwLockWriteGuard<'_, T> {
|
pub fn write(&self) -> RwLockWriteGuard<'_, T> {
|
||||||
self.0.borrow_mut()
|
self.0.borrow_mut()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
|
pub fn into_inner(self) -> T {
|
||||||
|
self.0.into_inner()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user