Skip to content

Commit af68b04

Browse files
committed
fixup: fix unrelated clippy warnings
Signed-off-by: Doru Blânzeanu <[email protected]>
1 parent a1caae1 commit af68b04

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/hyperlight_host/src/mem/layout.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,18 +224,24 @@ impl SandboxMemoryLayout {
224224
pub(crate) const PML4_OFFSET: usize = 0x0000;
225225
/// The offset into the sandbox's memory where the Page Directory Pointer
226226
/// Table starts.
227+
#[cfg(feature = "init-paging")]
227228
pub(super) const PDPT_OFFSET: usize = 0x1000;
228229
/// The offset into the sandbox's memory where the Page Directory starts.
230+
#[cfg(feature = "init-paging")]
229231
pub(super) const PD_OFFSET: usize = 0x2000;
230232
/// The offset into the sandbox's memory where the Page Tables start.
233+
#[cfg(feature = "init-paging")]
231234
pub(super) const PT_OFFSET: usize = 0x3000;
232235
/// The address (not the offset) to the start of the page directory
236+
#[cfg(feature = "init-paging")]
233237
pub(super) const PD_GUEST_ADDRESS: usize = Self::BASE_ADDRESS + Self::PD_OFFSET;
234238
/// The address (not the offset) into sandbox memory where the Page
235239
/// Directory Pointer Table starts
240+
#[cfg(feature = "init-paging")]
236241
pub(super) const PDPT_GUEST_ADDRESS: usize = Self::BASE_ADDRESS + Self::PDPT_OFFSET;
237242
/// The address (not the offset) into sandbox memory where the Page
238243
/// Tables start
244+
#[cfg(feature = "init-paging")]
239245
pub(super) const PT_GUEST_ADDRESS: usize = Self::BASE_ADDRESS + Self::PT_OFFSET;
240246
/// The maximum amount of memory a single sandbox will be allowed.
241247
/// The addressable virtual memory with current paging setup is virtual address 0x0 - 0x40000000 (excl.),

src/hyperlight_host/src/mem/mgr.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,9 @@ impl SandboxMemoryManager<ExclusiveSharedMemory> {
374374
shared_mem.write_u64(offset, load_addr_u64)?;
375375
}
376376

377+
// The load method returns a LoadInfo which can also be a different type once the
378+
// `unwind_guest` feature is enabled.
379+
#[allow(clippy::let_unit_value)]
377380
let load_info = exe_info.load(
378381
load_addr.clone().try_into()?,
379382
&mut shared_mem.as_mut_slice()[layout.get_guest_code_offset()..],

0 commit comments

Comments
 (0)