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
|
|
@ -9,10 +9,9 @@ use crate::{Backend, Primitive};
|
|||
use iced_native::layout;
|
||||
use iced_native::mouse;
|
||||
use iced_native::{
|
||||
Clipboard, Element, Hasher, Layout, Length, Point, Rectangle, Shell, Size,
|
||||
Vector, Widget,
|
||||
Clipboard, Element, Layout, Length, Point, Rectangle, Shell, Size, Vector,
|
||||
Widget,
|
||||
};
|
||||
use std::hash::Hash;
|
||||
use std::marker::PhantomData;
|
||||
|
||||
pub mod event;
|
||||
|
|
@ -226,14 +225,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);
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, Message, P, B> From<Canvas<Message, P>>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ use crate::Backend;
|
|||
|
||||
use iced_native::layout;
|
||||
use iced_native::{
|
||||
Color, Element, Hasher, Layout, Length, Point, Rectangle, Size, Vector,
|
||||
Widget,
|
||||
Color, Element, Layout, Length, Point, Rectangle, Size, Vector, Widget,
|
||||
};
|
||||
use thiserror::Error;
|
||||
|
||||
|
|
@ -74,12 +73,6 @@ where
|
|||
))
|
||||
}
|
||||
|
||||
fn hash_layout(&self, state: &mut Hasher) {
|
||||
use std::hash::Hash;
|
||||
|
||||
self.state.contents.hash(state);
|
||||
}
|
||||
|
||||
fn draw(
|
||||
&self,
|
||||
renderer: &mut Renderer<B>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue