Complete some hash_layout implementations

This commit is contained in:
Héctor Ramón Jiménez 2019-09-20 19:31:49 +02:00
parent b9e0f74948
commit eda1048dbc
3 changed files with 7 additions and 6 deletions

View file

@ -7,9 +7,7 @@
//! [`Class`]: enum.Class.html
use crate::input::{mouse, ButtonState};
use crate::{
Element, Event, Hasher, Layout, MouseCursor, Node, Point, Rectangle, Widget,
};
use crate::{Element, Event, Hasher, Layout, MouseCursor, Node, Point, Widget};
use std::hash::Hash;
pub use iced_core::button::*;
@ -70,7 +68,9 @@ where
}
fn hash_layout(&self, state: &mut Hasher) {
self.label.hash(state);
self.width.hash(state);
self.align_self.hash(state);
}
}

View file

@ -1,8 +1,6 @@
//! Display images in your user interface.
use crate::{
Element, Hasher, Layout, MouseCursor, Node, Point, Rectangle, Widget,
};
use crate::{Element, Hasher, Layout, MouseCursor, Node, Point, Widget};
use std::hash::Hash;
@ -31,6 +29,7 @@ where
fn hash_layout(&self, state: &mut Hasher) {
self.width.hash(state);
self.height.hash(state);
self.align_self.hash(state);
}
}

View file

@ -27,6 +27,8 @@ where
fn hash_layout(&self, state: &mut Hasher) {
self.content.hash(state);
self.size.hash(state);
self.width.hash(state);
self.height.hash(state);
}
}