diff options
author | Daniel Schadt <kingdread@gmx.de> | 2020-05-02 14:19:27 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2020-05-02 14:19:27 +0200 |
commit | 8b14355557ca7bf19318d0f8d4b54ce439cdc8c8 (patch) | |
tree | 8dcfe07121c6d259cf7f9624eb670a85763502bc /src/lib.rs | |
parent | 69f8feb33465de6213963c1aadf955704bb83a08 (diff) | |
download | evtclib-8b14355557ca7bf19318d0f8d4b54ce439cdc8c8.tar.gz evtclib-8b14355557ca7bf19318d0f8d4b54ce439cdc8c8.tar.bz2 evtclib-8b14355557ca7bf19318d0f8d4b54ce439cdc8c8.zip |
use getters for Event
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -773,9 +773,9 @@ impl Log { self.events().iter().find_map(|e| { if let EventKind::LogStart { local_timestamp, .. - } = e.kind + } = e.kind() { - Some(local_timestamp) + Some(*local_timestamp) } else { None } @@ -791,9 +791,9 @@ impl Log { self.events().iter().find_map(|e| { if let EventKind::LogEnd { local_timestamp, .. - } = e.kind + } = e.kind() { - Some(local_timestamp) + Some(*local_timestamp) } else { None } @@ -806,7 +806,7 @@ impl Log { /// (`false`). pub fn was_rewarded(&self) -> bool { self.events().iter().any(|e| { - if let EventKind::Reward { .. } = e.kind { + if let EventKind::Reward { .. } = e.kind() { true } else { false |