Skip to content

Commit

Permalink
Refactor to use storeSlab()
Browse files Browse the repository at this point in the history
  • Loading branch information
fxamacker committed Mar 8, 2024
1 parent 1146387 commit 8e77472
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions map.go
Original file line number Diff line number Diff line change
Expand Up @@ -3824,13 +3824,7 @@ func (m *OrderedMap) SetType(typeInfo TypeInfo) error {
m.root.SetExtraData(extraData)

// Store modified root slab in storage since typeInfo is part of extraData stored in root slab.
err := m.Storage.Store(m.root.Header().id, m.root)
if err != nil {
// Wrap err as external error (if needed) because err is returned by SlabStorage interface.
return wrapErrorfAsExternalErrorIfNeeded(err, fmt.Sprintf("failed to store slab %s", m.root.Header().id))
}

return nil
return storeSlab(m.Storage, m.root)
}

func (m *OrderedMap) String() string {
Expand Down

0 comments on commit 8e77472

Please sign in to comment.