From c35c047fc3da7adcf32fbcb7541faf21ee464310 Mon Sep 17 00:00:00 2001 From: Jimmy Bourassa Date: Tue, 4 Apr 2023 12:49:00 -0400 Subject: [PATCH] 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 --- crates/wasmtime/src/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/wasmtime/src/types.rs b/crates/wasmtime/src/types.rs index 7286eb819a..3bcb288990 100644 --- a/crates/wasmtime/src/types.rs +++ b/crates/wasmtime/src/types.rs @@ -19,7 +19,7 @@ pub enum Mutability { // Value Types /// 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 { // NB: the ordering here is intended to match the ordering in // `wasmtime_types::WasmType` to help improve codegen when converting.