diff options
author | Daniel Schadt <kingdread@gmx.de> | 2018-04-23 17:00:14 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2018-04-23 17:00:14 +0200 |
commit | c6cd5dfef5ca037862c79f7abe460e1b88c8dab4 (patch) | |
tree | 5ed70f85bb238184b9f32a9b33b4e721d7dcb1ed /src/lib.rs | |
parent | 6165bf6e4cfde199c3bc8bd0b862eb7de309aec3 (diff) | |
download | evtclib-c6cd5dfef5ca037862c79f7abe460e1b88c8dab4.tar.gz evtclib-c6cd5dfef5ca037862c79f7abe460e1b88c8dab4.tar.bz2 evtclib-c6cd5dfef5ca037862c79f7abe460e1b88c8dab4.zip |
more documentation
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -118,13 +118,17 @@ impl Log { } /// Return an iterator over all agents that represent player characters. - pub fn players(&self) -> impl Iterator<Item=&Agent> { - self.agents.iter().filter(|a| matches!(a.kind, AgentKind::Player { .. })) + pub fn players(&self) -> impl Iterator<Item = &Agent> { + self.agents + .iter() + .filter(|a| matches!(a.kind, AgentKind::Player { .. })) } /// Return an iterator over all agents that are NPCs. - pub fn npcs(&self) -> impl Iterator<Item=&Agent> { - self.agents.iter().filter(|a| matches!(a.kind, AgentKind::Character(_))) + pub fn npcs(&self) -> impl Iterator<Item = &Agent> { + self.agents + .iter() + .filter(|a| matches!(a.kind, AgentKind::Character(_))) } /// Return all events present in this log. @@ -135,7 +139,7 @@ impl Log { pub fn process(data: &raw::Evtc) -> Result<Log, EvtcError> { // Prepare "augmented" agents - let mut agents = setup_agents(data)?; + let mut agents = setup_agents(data)?; // Do the first aware/last aware field set_agent_awares(data, &mut agents)?; |