Skip to content

Commit

Permalink
Refactor to use SlabIndex instead of [8]byte
Browse files Browse the repository at this point in the history
  • Loading branch information
fxamacker committed Oct 2, 2023
1 parent 03acd49 commit 90be7ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion array.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ func DecodeInlinedArrayStorable(
len(b)))
}

var index [8]byte
var index SlabIndex
copy(index[:], b)

slabID := NewSlabID(parentSlabID.address, index)
Expand Down
8 changes: 4 additions & 4 deletions map.go
Original file line number Diff line number Diff line change
Expand Up @@ -2479,10 +2479,10 @@ func DecodeInlinedCompositeStorable(
len(b)))
}

var index [8]byte
var index SlabIndex
copy(index[:], b)

slabID := NewSlabID(parentSlabID.address, SlabIndex(index))
slabID := NewSlabID(parentSlabID.address, index)

// Decode values
elemCount, err := dec.DecodeArrayHead()
Expand Down Expand Up @@ -2618,10 +2618,10 @@ func DecodeInlinedMapStorable(
len(b)))
}

var index [8]byte
var index SlabIndex
copy(index[:], b)

slabID := NewSlabID(parentSlabID.address, SlabIndex(index))
slabID := NewSlabID(parentSlabID.address, index)

// Decode elements
elements, err := newElementsFromData(dec, decodeStorable, parentSlabID, inlinedExtraData)
Expand Down

0 comments on commit 90be7ac

Please sign in to comment.