From 4157bb6c168d40e18c33ba1592a15b8032ec4ab1 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Sat, 19 Dec 2020 12:48:28 +0100 Subject: [PATCH] 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 --- gstreamer-video/src/video_time_code_interval.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gstreamer-video/src/video_time_code_interval.rs b/gstreamer-video/src/video_time_code_interval.rs index 5c8858343..66fa19350 100644 --- a/gstreamer-video/src/video_time_code_interval.rs +++ b/gstreamer-video/src/video_time_code_interval.rs @@ -79,7 +79,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 }