-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Critical objectstorage fix, Storable.ImportStorable, ShrinkingMap.Set return value and more #440
Conversation
…into feat/storable-import
…into feat/storable-import
@@ -68,12 +68,12 @@ func New[K comparable, V any](opts ...Option) *ShrinkingMap[K, V] { | |||
return shrinkingMap | |||
} | |||
|
|||
// Set adds a key-value pair to the map. It returns true if the key exists. | |||
func (s *ShrinkingMap[K, V]) Set(key K, value V) (updated bool) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changed the logic completely 😱
We use the shrining map also in other projects....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I checked all projects I know. We don't use the return value by now.
Description of change
Storable
model initializeable from another model.updated
status of an object; the value should be constrained tocomparable
. Return if the entry was instead created, regarded of its value update.Get
andSet
base values instead of pointers to such values. This aids the storage of basic types.WithRealm
in favor ofWithExtendedRealm
to avoid potential prefix clashes.