Skip to content

Commit 253fc42

Browse files
committed
Fix clippy
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
1 parent c5f8f5c commit 253fc42

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/hyperlight_host/src/mem/memory_region.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ pub struct MemoryRegion_<K: MemoryRegionKind> {
272272
/// memory access flags for the given region
273273
pub flags: MemoryRegionFlags,
274274
/// the type of memory region
275-
pub region_type: MemoryRegionType,
275+
pub(crate) region_type: MemoryRegionType,
276276
}
277277

278278
/// A memory region that tracks both host and guest addresses.

src/hyperlight_host/src/sandbox/initialized_multi_use.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,11 @@ impl Drop for OwnedFileMapping {
8484
}) {
8585
tracing::error!("Failed to unmap file view at {:?}: {:?}", self.view_base, e);
8686
}
87-
if let Err(e) = CloseHandle(self.mapping_handle.into()) {
87+
let mapping_handle = self.mapping_handle.into();
88+
if let Err(e) = CloseHandle(mapping_handle) {
8889
tracing::error!(
8990
"Failed to close file mapping handle {:?}: {:?}",
90-
self.mapping_handle,
91+
mapping_handle,
9192
e
9293
);
9394
}
@@ -394,7 +395,7 @@ impl MultiUseSandbox {
394395
.map_err(HyperlightVmError::UnmapRegion)?;
395396

396397
// Clean up host-side file mapping resources for regions that
397-
// were created by map_file_cow. The OwnedFileMapping::Drop
398+
// were created by map_file_cow. The OwnedFileMapping::drop
398399
// will call UnmapViewOfFile + CloseHandle.
399400
#[cfg(target_os = "windows")]
400401
self.file_mappings

0 commit comments

Comments
 (0)