-
Notifications
You must be signed in to change notification settings - Fork 469
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
Refactor/optim #272
Refactor/optim #272
Conversation
69fa7a8
to
b30278a
Compare
8dd6554
to
605a0b3
Compare
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.
There is one question about serde's empty bound. Not sure if this should be empty on purpose or no bound should be set.
} | ||
|
||
#[derive(Serialize, Deserialize)] | ||
#[serde(bound = "")] |
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.
Should the bound be empty?
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.
Yes, it should, because no matter the generics, Serialize and Deserialize should always be implemented.
} | ||
|
||
#[derive(Serialize, Deserialize)] | ||
#[serde(bound = "")] |
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.
Same question about the bound
Refactor how optimizer works.
Now similar to modules, they have their own Record associative type to determine how their state will be saved. There is two optimizer traits, one for simpler implementations and the other more general.