Skip to content
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

fix: move all default DamageModifierResponse values to use Default::default instead #107

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

FlaminSarge
Copy link
Contributor

@FlaminSarge FlaminSarge commented Apr 22, 2024

This is in preparation for Melee damage handling from #105.

Any scalar here that previously used a value of '1.0' has been removed (to pick up defaults), and all DamageModifierResponses now specify ..Default::default() so that any updates to the DamageModifierResponse struct will not require updating every single perk.

Add non_exhausive to DamageModifierResponse as it will have fields added in the near future
This should be removed once we expect no more fields to be added to the struct.
https://doc.rust-lang.org/reference/attributes/type_system.html#the-non_exhaustive-attribute
This prevents clippy from flagging the use of default on fully-specified struct values.

…efault instead

This is in preparation for Melee damage handling
…ded in the near future

This should be removed once we expect no more fields to be added to the struct.
https://doc.rust-lang.org/reference/attributes/type_system.html#the-non_exhaustive-attribute
This prevents clippy from flagging the use of default on fully-specified struct values.
@BarmonHammer BarmonHammer merged commit 719ccc4 into d2foundry:main Apr 23, 2024
1 check passed
@FlaminSarge FlaminSarge deleted the defaults branch April 25, 2024 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants