aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2020-05-02 14:19:27 +0200
committerDaniel Schadt <kingdread@gmx.de>2020-05-02 14:19:27 +0200
commit8b14355557ca7bf19318d0f8d4b54ce439cdc8c8 (patch)
tree8dcfe07121c6d259cf7f9624eb670a85763502bc /src/lib.rs
parent69f8feb33465de6213963c1aadf955704bb83a08 (diff)
downloadevtclib-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.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 8f7d9d1..cc407e8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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