Skip to content

Commit

Permalink
Reuse notifyParentIfNeeded in Array.SetType()
Browse files Browse the repository at this point in the history
  • Loading branch information
fxamacker committed Mar 8, 2024
1 parent a05f97e commit 8c7c31e
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions array.go
Original file line number Diff line number Diff line change
Expand Up @@ -3600,16 +3600,9 @@ func (a *Array) SetType(typeInfo TypeInfo) error {

if a.Inlined() {
// Array is inlined.
// Notify parent container so parent slab is saved in storage with updated TypeInfo of inlined array.
found, err := a.parentUpdater()
if err != nil {
return err
}
if !found {
a.parentUpdater = nil
}

return nil
// Notify parent container so parent slab is saved in storage with updated TypeInfo of inlined array.
return a.notifyParentIfNeeded()
}

// Array is standalone.
Expand Down

0 comments on commit 8c7c31e

Please sign in to comment.