page_cache: remove dead code (#5493)

This commit is contained in:
Christian Schwarz
2023-10-17 16:56:16 +02:00
committed by GitHub
parent 4a50483861
commit 3a8959a4c4

View File

@@ -318,15 +318,6 @@ impl std::ops::Deref for PageWriteGuard<'_> {
}
}
impl AsMut<[u8; PAGE_SZ]> for PageWriteGuard<'_> {
fn as_mut(&mut self) -> &mut [u8; PAGE_SZ] {
match &mut self.state {
PageWriteGuardState::Invalid { inner, _permit } => inner.buf,
PageWriteGuardState::Downgraded => unreachable!(),
}
}
}
impl<'a> PageWriteGuard<'a> {
/// Mark that the buffer contents are now valid.
#[must_use]