diff options
author | François Laignel <fengalin@free.fr> | 2021-10-09 13:17:05 +0300 |
---|---|---|
committer | François Laignel <fengalin@free.fr> | 2021-10-18 16:09:47 +0300 |
commit | 27b9f0d868f436e9b2bcc3e51f393c40b56fcc02 (patch) | |
tree | 93c0db7b1cf26ea7d0e3a4d70a7d2844c2e00975 /video/webp | |
parent | bd8a7e8df7e8ebf751b2d00fe6a096d726683c00 (diff) |
Improve usability thanks to opt-ops
The crate option-operations simplifies usage when dealing with
`Option`s, which is often the case with `ClockTime`.
Diffstat (limited to 'video/webp')
-rw-r--r-- | video/webp/tests/webpdec.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/video/webp/tests/webpdec.rs b/video/webp/tests/webpdec.rs index 6dfb04656..4d8e2dd3a 100644 --- a/video/webp/tests/webpdec.rs +++ b/video/webp/tests/webpdec.rs @@ -48,9 +48,7 @@ fn test_decode() { assert_eq!(buf.pts(), expected_timestamp); assert_eq!(buf.duration(), expected_duration); - expected_timestamp = expected_timestamp - .zip(expected_duration) - .map(|(ts, duration)| ts + duration); + expected_timestamp = expected_timestamp.opt_add(expected_duration); count += 1; } |