Derive Copy on wasmtime::ValType (#6138)

`ValType` is small enough that it can be copiable. Doing so means
Copy types can embed a `ValType` in them.

The need for this came up in this Wasmtime Ruby PR:
https://github.com/bytecodealliance/wasmtime-rb/pull/158
This commit is contained in:
Jimmy Bourassa
2023-04-04 12:49:00 -04:00
committed by GitHub
parent c475735f5e
commit c35c047fc3

View File

@@ -19,7 +19,7 @@ pub enum Mutability {
// Value Types // Value Types
/// A list of all possible value types in WebAssembly. /// A list of all possible value types in WebAssembly.
#[derive(Debug, Clone, Hash, Eq, PartialEq)] #[derive(Debug, Clone, Copy, Hash, Eq, PartialEq)]
pub enum ValType { pub enum ValType {
// NB: the ordering here is intended to match the ordering in // NB: the ordering here is intended to match the ordering in
// `wasmtime_types::WasmType` to help improve codegen when converting. // `wasmtime_types::WasmType` to help improve codegen when converting.