From 96d6a16ce951824c986766c280b3fd0281f8f262 Mon Sep 17 00:00:00 2001 From: Austin Wise Date: Fri, 13 Dec 2019 17:25:08 -0800 Subject: [PATCH] Remove unneed dynamic binding in MemoryBinding. The Validate function already checks that the field type is Memory. --- crates/misc/dotnet/src/Bindings/MemoryBinding.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/misc/dotnet/src/Bindings/MemoryBinding.cs b/crates/misc/dotnet/src/Bindings/MemoryBinding.cs index ea6c860f96..790f3c5ddb 100644 --- a/crates/misc/dotnet/src/Bindings/MemoryBinding.cs +++ b/crates/misc/dotnet/src/Bindings/MemoryBinding.cs @@ -45,7 +45,7 @@ namespace Wasmtime.Bindings internal override SafeHandle Bind(Store store, IHost host) { - dynamic memory = Field.GetValue(host); + Memory memory = (Memory)Field.GetValue(host); if (memory.Handle != null) { throw new InvalidOperationException("Cannot bind more than once.");