Remove hash_layout method from Widget trait
This commit is contained in:
parent
9fe5080153
commit
1313c94e3b
35 changed files with 105 additions and 636 deletions
|
|
@ -10,8 +10,8 @@ use crate::renderer;
|
|||
use crate::text::{self, Text};
|
||||
use crate::touch;
|
||||
use crate::{
|
||||
Clipboard, Element, Hasher, Layout, Length, Padding, Point, Rectangle,
|
||||
Shell, Size, Widget,
|
||||
Clipboard, Element, Layout, Length, Padding, Point, Rectangle, Shell, Size,
|
||||
Widget,
|
||||
};
|
||||
use std::borrow::Cow;
|
||||
|
||||
|
|
@ -220,24 +220,6 @@ where
|
|||
layout::Node::new(size)
|
||||
}
|
||||
|
||||
fn hash_layout(&self, state: &mut Hasher) {
|
||||
use std::hash::Hash as _;
|
||||
|
||||
match self.width {
|
||||
Length::Shrink => {
|
||||
self.placeholder.hash(state);
|
||||
|
||||
self.options
|
||||
.iter()
|
||||
.map(ToString::to_string)
|
||||
.for_each(|label| label.hash(state));
|
||||
}
|
||||
_ => {
|
||||
self.width.hash(state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn on_event(
|
||||
&mut self,
|
||||
event: Event,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue