-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.
Description
#6086 introduced suspicious_operation_groupings
that made us find a binop issue in Gstreamer. In addition to if
statements in #6275 it'd be nice to support binary function call chains like cmp
as well, which suffered the same issue:
self.0
.hours
.cmp(&other.0.hours)
.then_with(|| self.0.minutes.cmp(&other.0.hours)) // Should be other.0.minutes
.then_with(|| self.0.seconds.cmp(&other.0.seconds))
.then_with(|| self.0.frames.cmp(&other.0.frames))
The expressions are separated by then_with
and closures instead of a simple &&
binary op so this might be quite a stretch.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.