Browse Source

Remove unneed dynamic binding in MemoryBinding.

The Validate function already checks that the field type is Memory.
pull/718/head
Austin Wise 5 years ago
parent
commit
96d6a16ce9
  1. 2
      crates/misc/dotnet/src/Bindings/MemoryBinding.cs

2
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.");

Loading…
Cancel
Save