video/time_code_interval: Do not compare minutes to hours in PartialEq

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
This commit is contained in:
Marijn Suijten 2020-12-19 12:48:28 +01:00
parent 87446d4d8e
commit 5740a70dd2

View file

@ -63,7 +63,7 @@ unsafe impl Sync for VideoTimeCodeInterval {}
impl PartialEq for VideoTimeCodeInterval {
fn eq(&self, other: &Self) -> bool {
self.0.hours == other.0.hours
&& self.0.minutes == other.0.hours
&& self.0.minutes == other.0.minutes
&& self.0.seconds == other.0.seconds
&& self.0.frames == other.0.frames
}