aboutsummaryrefslogtreecommitdiffstats
path: root/nihav-core/src/frame.rs
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2020-06-16 12:08:29 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2020-06-16 12:08:29 +0200
commitb36f412c24813b14cb2b1f8fd151863e2a49c1e2 (patch)
tree9764fca5cc1e2273e9b3bbbe29ef6e72a8a82fea /nihav-core/src/frame.rs
parent36ce88be3f590a876fe539c8f631a58af2ea2cac (diff)
downloadnihav-b36f412c24813b14cb2b1f8fd151863e2a49c1e2.tar.gz
core: fix or silence clippy warnings
Diffstat (limited to 'nihav-core/src/frame.rs')
-rw-r--r--nihav-core/src/frame.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/nihav-core/src/frame.rs b/nihav-core/src/frame.rs
index 6386d6f..8944f45 100644
--- a/nihav-core/src/frame.rs
+++ b/nihav-core/src/frame.rs
@@ -927,8 +927,8 @@ impl NATimeInfo {
/// Converts time in given scale into timestamp in given base.
pub fn time_to_ts(time: u64, base: u64, tb_num: u32, tb_den: u32) -> u64 {
- let tb_num = tb_num as u64;
- let tb_den = tb_den as u64;
+ let tb_num = u64::from(tb_num);
+ let tb_den = u64::from(tb_den);
let tmp = time.checked_mul(tb_num);
if let Some(tmp) = tmp {
tmp / base / tb_den
@@ -949,8 +949,8 @@ impl NATimeInfo {
}
/// Converts timestamp in given base into time in given scale.
pub fn ts_to_time(ts: u64, base: u64, tb_num: u32, tb_den: u32) -> u64 {
- let tb_num = tb_num as u64;
- let tb_den = tb_den as u64;
+ let tb_num = u64::from(tb_num);
+ let tb_den = u64::from(tb_den);
let tmp = ts.checked_mul(base);
if let Some(tmp) = tmp {
let tmp2 = tmp.checked_mul(tb_num);