From 5740a70dd2dde9d836f589a6e556172eaace175d 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 2779f43bf..7789708a1 100644 --- a/gstreamer-video/src/video_time_code_interval.rs +++ b/gstreamer-video/src/video_time_code_interval.rs @@ -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 }