Don't be clever about representing non-CoW images (#4691)

This commit fixes a build warning on Rust 1.63 when the `memory-init-cow`
feature is disabled in the `wasmtime-runtime` crate. Some "tricks" were
used prior to have the `MemoryImage` type be an empty `enum {}` but that
wreaks havoc with warnings so this commit instead just makes it a unit
struct and makes all methods panic (as they shouldn't be hit anyway).
This commit is contained in:
Alex Crichton
2022-08-11 13:16:28 -05:00
committed by GitHub
parent c5bc368cfe
commit c1c48b4386
2 changed files with 9 additions and 8 deletions

View File

@@ -19,7 +19,6 @@
clippy::use_self
)
)]
#![cfg_attr(not(memory_init_cow), allow(unused_variables, unreachable_code))]
use anyhow::Error;
use std::sync::atomic::{AtomicU64, AtomicUsize, Ordering};