diff options
author | Daniel Schadt <kingdread@gmx.de> | 2018-05-31 16:05:52 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2018-05-31 16:05:52 +0200 |
commit | 2d8c0f26c71e90e30d8aef35f7ae95003abf13d6 (patch) | |
tree | feb1b11fbc1409214c7ef23299df9ea813888f6e /src/statistics | |
parent | 4f3aa33ad3c7012105ef897da62220131ac9289c (diff) | |
download | evtclib-2d8c0f26c71e90e30d8aef35f7ae95003abf13d6.tar.gz evtclib-2d8c0f26c71e90e30d8aef35f7ae95003abf13d6.tar.bz2 evtclib-2d8c0f26c71e90e30d8aef35f7ae95003abf13d6.zip |
cargo fmt
Diffstat (limited to 'src/statistics')
-rw-r--r-- | src/statistics/boon.rs | 3 | ||||
-rw-r--r-- | src/statistics/gamedata.rs | 3 | ||||
-rw-r--r-- | src/statistics/trackers.rs | 13 |
3 files changed, 9 insertions, 10 deletions
diff --git a/src/statistics/boon.rs b/src/statistics/boon.rs index 6378d50..425f4a5 100644 --- a/src/statistics/boon.rs +++ b/src/statistics/boon.rs @@ -116,7 +116,8 @@ impl BoonQueue { } BoonType::Intensity => { - self.queue = self.queue + self.queue = self + .queue .iter() .cloned() .filter(|v| *v > duration) diff --git a/src/statistics/gamedata.rs b/src/statistics/gamedata.rs index a6dbf15..73f2780 100644 --- a/src/statistics/gamedata.rs +++ b/src/statistics/gamedata.rs @@ -37,11 +37,9 @@ pub static BOONS: &[Boon] = &[ Boon(719, "Swiftness", 9, BoonType::Duration), Boon(1187, "Quickness", 5, BoonType::Duration), Boon(726, "Vigor", 5, BoonType::Duration), - // Intensity based Boon(740, "Might", 25, BoonType::Intensity), Boon(1122, "Stability", 25, BoonType::Intensity), - // Standard conditions. // Duration based Boon(720, "Blinded", 5, BoonType::Duration), @@ -51,7 +49,6 @@ pub static BOONS: &[Boon] = &[ Boon(727, "Immobile", 3, BoonType::Duration), Boon(26766, "Slow", 3, BoonType::Duration), Boon(742, "Weakness", 3, BoonType::Duration), - // Intensity based Boon(736, "Bleeding", 1500, BoonType::Intensity), Boon(737, "Burning", 1500, BoonType::Intensity), diff --git a/src/statistics/trackers.rs b/src/statistics/trackers.rs index b64e586..2783285 100644 --- a/src/statistics/trackers.rs +++ b/src/statistics/trackers.rs @@ -272,7 +272,8 @@ impl BoonTracker { for (agent, queues) in &self.boon_queues { for (buff_id, queue) in queues { let current_stacks = queue.current_stacks(); - let area = self.boon_areas + let area = self + .boon_areas .entry(*agent) .or_insert_with(Default::default) .entry(*buff_id) @@ -283,7 +284,8 @@ impl BoonTracker { } fn update_next_update(&mut self) { - let next_update = self.boon_queues + let next_update = self + .boon_queues .values() .flat_map(HashMap::values) .map(BoonQueue::next_update) @@ -301,7 +303,8 @@ impl BoonTracker { /// * `buff_id` - The buff (or condition) id. fn get_queue(&mut self, agent: u64, buff_id: u16) -> Option<&mut BoonQueue> { use std::collections::hash_map::Entry; - let mut entry = self.boon_queues + let mut entry = self + .boon_queues .entry(agent) .or_insert_with(Default::default) .entry(buff_id); @@ -310,15 +313,13 @@ impl BoonTracker { Entry::Occupied(e) => Some(e.into_mut()), // Queue needs to be created, but only if we know about that boon. Entry::Vacant(e) => { - let boon_queue = gamedata::get_boon(buff_id) - .map(gamedata::Boon::create_queue); + let boon_queue = gamedata::get_boon(buff_id).map(gamedata::Boon::create_queue); if let Some(queue) = boon_queue { Some(e.insert(queue)) } else { None } } - } } } |