diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-09-10 12:26:29 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-09-10 14:12:52 +0200 |
commit | 73f0f89ff3a3616a8e65b5a31c2303725994c56a (patch) | |
tree | 55b9cd6e522a56eac2549bc978b139465fd395cf /nihav-core/src/frame.rs | |
parent | 789354a8ca628eb09dd4aaf2ec660eeb7f21be9a (diff) | |
download | nihav-73f0f89ff3a3616a8e65b5a31c2303725994c56a.tar.gz |
core: fix clippy warnings
Diffstat (limited to 'nihav-core/src/frame.rs')
-rw-r--r-- | nihav-core/src/frame.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nihav-core/src/frame.rs b/nihav-core/src/frame.rs index f7a318a..fbccfbe 100644 --- a/nihav-core/src/frame.rs +++ b/nihav-core/src/frame.rs @@ -979,7 +979,7 @@ impl NATimeInfo { } } } - fn get_cur_ts(&self) -> u64 { self.pts.unwrap_or(self.dts.unwrap_or(0)) } + fn get_cur_ts(&self) -> u64 { self.pts.unwrap_or_else(|| self.dts.unwrap_or(0)) } fn get_cur_millis(&self) -> u64 { let ts = self.get_cur_ts(); Self::ts_to_time(ts, 1000, self.tb_num, self.tb_den) |