Clippy nightly is becoming surprisingly smart these days:
warning: This sequence of operators looks suspiciously like a bug.
--> gstreamer-video/src/video_time_code_interval.rs:66:16
|
66 | && self.0.minutes == other.0.hours
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: I think you meant: `self.0.minutes == other.0.minutes`
|
= note: `#[warn(clippy::suspicious_operation_groupings)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_operation_groupings
Fixes clippy warnings, prevents confusing errors and is more consistent.
The Display trait provides a to_string() method by itself and FromStr
provides from_str().
There's a VideoTimeCode type that represents any kind of timecodes,
including invalid ones, and which allows to change each field
individually. And ValidVideoTimeCode that has all fields
validated and that can be used with most of the API.
In C, validation of the timecodes is left to the user and most functions
assert on getting passed valid timecodes.