mirror of
https://github.com/lifegpc/pixiv_downloader.git
synced 2026-07-08 01:32:41 +08:00
fanbox api: add list home
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use crate::ext::rw_lock::GetRwLock;
|
||||
use std::ops::DerefMut;
|
||||
use std::sync::MutexGuard;
|
||||
use std::sync::RwLock;
|
||||
use std::sync::RwLockWriteGuard;
|
||||
|
||||
@@ -30,6 +31,20 @@ impl<T> ReplaceWith<T> for T {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> ReplaceWith<T> for MutexGuard<'a, T> {
|
||||
#[inline]
|
||||
fn replace_with(&mut self, another: T) -> T {
|
||||
self.deref_mut().replace_with(another)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> ReplaceWith<T> for futures_util::lock::MutexGuard<'a, T> {
|
||||
#[inline]
|
||||
fn replace_with(&mut self, another: T) -> T {
|
||||
self.deref_mut().replace_with(another)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> ReplaceWith<T> for RwLockWriteGuard<'a, T> {
|
||||
#[inline]
|
||||
fn replace_with(&mut self, another: T) -> T {
|
||||
|
||||
Reference in New Issue
Block a user