refactor: use more readable clamp method

This commit is contained in:
2021-07-05 19:53:49 +02:00
parent b51c9939c1
commit 00a25e168d

View File

@@ -571,7 +571,7 @@ async fn transcode_gstreamer(
pos.map(|pos| {
let ratio = pos as f64 / dur as f64;
ratio.max(0.0).min(1.0)
ratio.clamp(0.0, 1.0)
})
});