-
Notifications
You must be signed in to change notification settings - Fork 400
refactor!: Box
the changeset of StoreErrorWithDump
#1998
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
base: master
Are you sure you want to change the base?
Conversation
I agree with the use of |
As mentioned in the corresponding issue, `Box`ing helps reduce memory overhead while passing the enum around and also to limit the size of enums with `StoreErrorWithDump` as a variant. Breaking: The enum `StoreErrorWithDump` has been changed.
46606d0
to
56f1fad
Compare
Removed the |
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.
Looks good to me!
I wonder is it necessary to box the changeset when returned in the
Ok
value, for example indump
andload
, etc.
We can ignore that, thinking in terms of the goal of this crate, which is to provide a testing database to experiment, not performance. load
and dump
are called most of the time just on the startup and on the shutdown of the code using the database, with occasional dumps for debugging.
ACK 56f1fad |
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.
ACK 56f1fad
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.
ACK 56f1fad
You need to do a rebase to get the updated rustc and MSRV fixed CI.
Description
Fixes #1991. As the linked issue mentions
Box
ing helps reduce memory overhead and limits the size of enums withStoreErrorWithDump
as variant.Breaking: The enum
StoreErrorWithDump
and the functionsload
,dump
andload_or_create
have been changed.Changelog Notice
Checklists
All Submissions: