Remove hash_layout method from Widget trait

This commit is contained in:
Héctor Ramón Jiménez 2022-02-22 14:10:49 +07:00
parent 9fe5080153
commit 1313c94e3b
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
35 changed files with 105 additions and 636 deletions

View file

@ -1,14 +1,12 @@
//! Distribute content vertically.
use std::hash::Hash;
use crate::event::{self, Event};
use crate::layout;
use crate::mouse;
use crate::overlay;
use crate::renderer;
use crate::{
Alignment, Clipboard, Element, Hasher, Layout, Length, Padding, Point,
Rectangle, Shell, Widget,
Alignment, Clipboard, Element, Layout, Length, Padding, Point, Rectangle,
Shell, Widget,
};
use std::u32;
@ -199,23 +197,6 @@ where
}
}
fn hash_layout(&self, state: &mut Hasher) {
struct Marker;
std::any::TypeId::of::<Marker>().hash(state);
self.width.hash(state);
self.height.hash(state);
self.max_width.hash(state);
self.max_height.hash(state);
self.align_items.hash(state);
self.spacing.hash(state);
self.padding.hash(state);
for child in &self.children {
child.widget.hash_layout(state);
}
}
fn overlay(
&mut self,
layout: Layout<'_>,