mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-30 13:13:55 +00:00
Use CachePage
in all related block functions
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
983a6af3cc
commit
ff453f5933
@ -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.
|
||||
|
@ -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>;
|
||||
|
||||
|
Reference in New Issue
Block a user