Skip to content

Commit

Permalink
respond to PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jimjbrettj committed Mar 27, 2023
1 parent a807601 commit 3d2a8dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions lib/runtime/newWasmer/memory.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Copyright 2023 ChainSafe Systems (ON)
// SPDX-License-Identifier: LGPL-3.0-only

package wasmer
package latestwasmer

import (
"errors"
"fmt"
"math"

wasmgo "github.com/wasmerio/wasmer-go/wasmer"
"github.com/wasmerio/wasmer-go/wasmer"
)

var (
Expand All @@ -19,7 +19,7 @@ var (
// Memory is a thin wrapper around Wasmer memory to support
// Gossamer runtime.Memory interface
type Memory struct {
memory *wasmgo.Memory
memory *wasmer.Memory
}

func checkBounds(value uint64) (uint32, error) {
Expand All @@ -45,9 +45,9 @@ func (m Memory) Length() uint32 {

// Grow grows the memory by the given number of pages
func (m Memory) Grow(numPages uint32) error {
ok := m.memory.Grow(wasmgo.Pages(numPages))
ok := m.memory.Grow(wasmer.Pages(numPages))
if !ok {
return fmt.Errorf("%w", errCantGrowMemory)
return fmt.Errorf("%w: by %d pages", errCantGrowMemory, numPages)
}
return nil
}
4 changes: 2 additions & 2 deletions lib/runtime/newWasmer/memory_test.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Copyright 2023 ChainSafe Systems (ON)
// SPDX-License-Identifier: LGPL-3.0-only

package wasmer
package latestwasmer

import (
"github.com/stretchr/testify/assert"
"math"
"testing"
"unsafe"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/wasmerio/wasmer-go/wasmer"
)
Expand Down

0 comments on commit 3d2a8dc

Please sign in to comment.