Skip to content

Commit 5dcca5e

Browse files
committed
fix: make clippy happy
Signed-off-by: Tomasz Andrzejak <andreiltd@gmail.com>
1 parent 4661172 commit 5dcca5e

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/hyperlight_common/src/arch/amd64/vmem.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ unsafe fn map_page<
265265
/// 2. PDPT (38:30) - allocate PD if needed
266266
/// 3. PD (29:21) - allocate PT if needed
267267
/// 4. PT (20:12) - write final PTE with physical address and flags
268+
///
268269
/// Multi-space page-table walking on amd64: walks each root
269270
/// independently and emits all leaves as `ThisSpace`. Aliased
270271
/// intermediate-table detection is not implemented — no current

src/hyperlight_host/src/sandbox/snapshot.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ impl hyperlight_common::vmem::TableReadOps for Snapshot {
128128
// care about presently) will be a not-present entry.
129129
return 0;
130130
};
131+
// The `get()` above ensures exactly PTE_SIZE bytes.
132+
#[allow(clippy::unwrap_used)]
131133
vmem::PageTableEntry::from_le_bytes(pte_bytes.try_into().unwrap())
132134
}
133135
#[allow(clippy::unnecessary_cast)]
@@ -223,6 +225,8 @@ impl<'a> hyperlight_common::vmem::TableReadOps for SharedMemoryPageTableBuffer<'
223225
// care about presently) will be a not-present entry.
224226
return 0;
225227
};
228+
// The `get()` above ensures exactly PTE_SIZE bytes.
229+
#[allow(clippy::unwrap_used)]
226230
vmem::PageTableEntry::from_le_bytes(pte_bytes.try_into().unwrap())
227231
}
228232
#[allow(clippy::unnecessary_cast)]

0 commit comments

Comments
 (0)