diff options
author | 2022-02-23 22:41:22 +0700 | |
---|---|---|
committer | 2022-02-23 22:41:22 +0700 | |
commit | af7cbf0003496d757696ea6e15ea32f0649cf8f9 (patch) | |
tree | a586436e4a1076543a3205ebc895a8463d9f7ffe /native/src/widget/container.rs | |
parent | 9fe50801537e8fbfd2914f5139b5a609929e25db (diff) | |
parent | 1313c94e3bb206f064462bc521f78dbffc2a6cd6 (diff) | |
download | iced-af7cbf0003496d757696ea6e15ea32f0649cf8f9.tar.gz iced-af7cbf0003496d757696ea6e15ea32f0649cf8f9.tar.bz2 iced-af7cbf0003496d757696ea6e15ea32f0649cf8f9.zip |
Merge pull request #1263 from iced-rs/remove-hash-layout
Remove `hash_layout` method from `Widget` trait
Diffstat (limited to 'native/src/widget/container.rs')
-rw-r--r-- | native/src/widget/container.rs | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/native/src/widget/container.rs b/native/src/widget/container.rs index 4444732a..ca85a425 100644 --- a/native/src/widget/container.rs +++ b/native/src/widget/container.rs @@ -1,6 +1,4 @@ //! Decorate content and apply alignment. -use std::hash::Hash; - use crate::alignment::{self, Alignment}; use crate::event::{self, Event}; use crate::layout; @@ -8,8 +6,8 @@ use crate::mouse; use crate::overlay; use crate::renderer; use crate::{ - Background, Clipboard, Color, Element, Hasher, Layout, Length, Padding, - Point, Rectangle, Shell, Widget, + Background, Clipboard, Color, Element, Layout, Length, Padding, Point, + Rectangle, Shell, Widget, }; use std::u32; @@ -219,21 +217,6 @@ where ); } - fn hash_layout(&self, state: &mut Hasher) { - struct Marker; - std::any::TypeId::of::<Marker>().hash(state); - - self.padding.hash(state); - self.width.hash(state); - self.height.hash(state); - self.max_width.hash(state); - self.max_height.hash(state); - self.horizontal_alignment.hash(state); - self.vertical_alignment.hash(state); - - self.content.hash_layout(state); - } - fn overlay( &mut self, layout: Layout<'_>, |