From 8e7747299d7148ebe4226685a03e61241ee59e1a Mon Sep 17 00:00:00 2001 From: Faye Amacker <33205765+fxamacker@users.noreply.github.com> Date: Fri, 8 Mar 2024 09:48:12 -0600 Subject: [PATCH] Refactor to use storeSlab() --- map.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/map.go b/map.go index 02ec654..49cd5ba 100644 --- a/map.go +++ b/map.go @@ -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 {