Skip to content

Commit 2ee6b29

Browse files
committed
fixup! Avoid copying memory on snapshot restore, when possible
Silence spurious panic warning Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com>
1 parent ad53a39 commit 2ee6b29

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/hyperlight_host/src/mem/shared_mem.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,6 +2033,7 @@ impl ReadonlySharedMemory {
20332033
region_type: MemoryRegionType,
20342034
) -> MemoryRegion {
20352035
if region_type != MemoryRegionType::Snapshot {
2036+
#[allow(clippy::panic)]
20362037
// This will not ever actually panic: the only place this
20372038
// is called is HyperlightVm::update_snapshot_mapping,
20382039
// which always calls it with the Snapshot region type.

0 commit comments

Comments
 (0)