Remove PartialOrd implementation for Rectangle
A `PartialOrd` implementation is unclear for this type, since it has a position besides its dimensions.
This commit is contained in:
parent
19f4373863
commit
f64e95e246
2 changed files with 3 additions and 7 deletions
|
|
@ -111,12 +111,6 @@ impl Rectangle<f32> {
|
|||
}
|
||||
}
|
||||
|
||||
impl std::cmp::PartialOrd for Rectangle<f32> {
|
||||
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
|
||||
(self.width * self.height).partial_cmp(&(other.width * other.height))
|
||||
}
|
||||
}
|
||||
|
||||
impl std::ops::Mul<f32> for Rectangle<f32> {
|
||||
type Output = Self;
|
||||
|
||||
|
|
|
|||
|
|
@ -896,7 +896,9 @@ fn notify_on_scroll<Message>(
|
|||
shell: &mut Shell<'_, Message>,
|
||||
) {
|
||||
if let Some(on_scroll) = on_scroll {
|
||||
if content_bounds <= bounds {
|
||||
if content_bounds.width <= bounds.width
|
||||
&& content_bounds.height <= bounds.height
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue