Remove warnings and refactor some code
This commit is contained in:
22
src/batch.rs
22
src/batch.rs
@@ -81,7 +81,7 @@ impl Event {
|
||||
.collect::<Vec<_>>()
|
||||
}
|
||||
|
||||
fn within_priors(
|
||||
pub(crate) fn within_priors(
|
||||
&self,
|
||||
online: bool,
|
||||
forward: bool,
|
||||
@@ -283,26 +283,6 @@ impl Batch {
|
||||
.collect::<HashMap<_, _>>()
|
||||
}
|
||||
|
||||
// TODO(anders): Remove this function.
|
||||
pub(crate) fn within_priors(
|
||||
&self,
|
||||
event: usize,
|
||||
online: bool,
|
||||
forward: bool,
|
||||
agents: &HashMap<Index, Agent>,
|
||||
) -> Vec<Vec<Player>> {
|
||||
self.events[event]
|
||||
.teams
|
||||
.iter()
|
||||
.map(|team| {
|
||||
team.items
|
||||
.iter()
|
||||
.map(|item| item.within_prior(online, forward, &self.skills, agents))
|
||||
.collect::<Vec<_>>()
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
}
|
||||
|
||||
pub(crate) fn iteration(&mut self, from: usize, agents: &HashMap<Index, Agent>) {
|
||||
for event in self.events.iter_mut().skip(from) {
|
||||
let teams = event.within_priors(false, false, &self.skills, agents);
|
||||
|
||||
Reference in New Issue
Block a user