Use (fd, file) as the key

This commit is contained in:
Ruihan Li
2024-09-01 20:55:11 +08:00
committed by Tate, Hongliang Tian
parent d70ae181b5
commit 479d98c8b9
4 changed files with 226 additions and 113 deletions

View File

@ -315,6 +315,12 @@ impl<T: ?Sized> From<KeyableWeak<T>> for Weak<T> {
}
}
impl<T: ?Sized> Clone for KeyableWeak<T> {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl<T: ?Sized + fmt::Debug> fmt::Debug for KeyableWeak<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "(KeyableWeak)")