Use CachePage in all related block functions

This commit is contained in:
Zhang Junyang
2024-12-27 11:55:56 +08:00
committed by Tate, Hongliang Tian
parent 983a6af3cc
commit ff453f5933
11 changed files with 72 additions and 67 deletions

View File

@ -307,13 +307,6 @@ impl<M: AnyUFrameMeta> From<Frame<M>> for UFrame {
}
}
impl<M: AnyUFrameMeta> From<&Frame<M>> for &UFrame {
fn from(frame: &Frame<M>) -> Self {
// SAFETY: The metadata is coerceable and the struct is transmutable.
unsafe { core::mem::transmute(frame) }
}
}
impl From<UFrame> for Frame<dyn AnyFrameMeta> {
fn from(frame: UFrame) -> Self {
// SAFETY: The metadata is coerceable and the struct is transmutable.

View File

@ -231,13 +231,6 @@ impl<M: AnyUFrameMeta> From<Segment<M>> for USegment {
}
}
impl<M: AnyUFrameMeta> From<&Segment<M>> for &USegment {
fn from(seg: &Segment<M>) -> Self {
// SAFETY: The metadata is coerceable and the struct is transmutable.
unsafe { core::mem::transmute(seg) }
}
}
impl TryFrom<Segment<dyn AnyFrameMeta>> for USegment {
type Error = Segment<dyn AnyFrameMeta>;