From 8b14355557ca7bf19318d0f8d4b54ce439cdc8c8 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sat, 2 May 2020 14:19:27 +0200 Subject: use getters for Event --- src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/lib.rs') 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 -- cgit v1.2.3