add AllocRange Debug impl; remove redundant AllocId Display impl
This commit is contained in:
@@ -160,12 +160,18 @@ impl AllocError {
|
||||
}
|
||||
|
||||
/// The information that makes up a memory access: offset and size.
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct AllocRange {
|
||||
pub start: Size,
|
||||
pub size: Size,
|
||||
}
|
||||
|
||||
impl fmt::Debug for AllocRange {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "[{:#x}..{:#x}]", self.start.bytes(), self.end().bytes())
|
||||
}
|
||||
}
|
||||
|
||||
/// Free-starting constructor for less syntactic overhead.
|
||||
#[inline(always)]
|
||||
pub fn alloc_range(start: Size, size: Size) -> AllocRange {
|
||||
|
||||
Reference in New Issue
Block a user