summaryrefslogtreecommitdiff
path: root/src/rules/ability_scores.rs
diff options
context:
space:
mode:
authorDavid Gay <eapoems@riseup.net>2023-10-14 17:55:57 -0400
committerDavid Gay <eapoems@riseup.net>2023-10-14 17:56:07 -0400
commitf585f5db852a34e2a6089bd460e7c68b8833ca4a (patch)
tree186ce7a4f752d2cf8220a9c95e3186b23959ebbb /src/rules/ability_scores.rs
parent916a0e84ce3e2d127fd403e15da214431924e4d0 (diff)
Partial implementation of Class struct
Diffstat (limited to 'src/rules/ability_scores.rs')
-rw-r--r--src/rules/ability_scores.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rules/ability_scores.rs b/src/rules/ability_scores.rs
index f255d4f..205c1a3 100644
--- a/src/rules/ability_scores.rs
+++ b/src/rules/ability_scores.rs
@@ -37,7 +37,10 @@ impl AbilityScoreCollection {
}
pub fn add_score(&mut self, ability_score: AbilityScore, bonus: u32) {
- self.scores.entry(ability_score).or_insert_with(Vec::new).push(bonus);
+ self.scores
+ .entry(ability_score)
+ .or_insert_with(Vec::new)
+ .push(bonus);
}
pub fn get_score(&self, ability_score: AbilityScore) -> Option<&Vec<u32>> {