diff options
author | 2022-02-22 14:10:49 +0700 | |
---|---|---|
committer | 2022-02-23 21:31:54 +0700 | |
commit | 1313c94e3bb206f064462bc521f78dbffc2a6cd6 (patch) | |
tree | a586436e4a1076543a3205ebc895a8463d9f7ffe /examples/custom_widget | |
parent | 9fe50801537e8fbfd2914f5139b5a609929e25db (diff) | |
download | iced-1313c94e3bb206f064462bc521f78dbffc2a6cd6.tar.gz iced-1313c94e3bb206f064462bc521f78dbffc2a6cd6.tar.bz2 iced-1313c94e3bb206f064462bc521f78dbffc2a6cd6.zip |
Remove `hash_layout` method from `Widget` trait
Diffstat (limited to 'examples/custom_widget')
-rw-r--r-- | examples/custom_widget/src/main.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/examples/custom_widget/src/main.rs b/examples/custom_widget/src/main.rs index b32cb83d..28edf256 100644 --- a/examples/custom_widget/src/main.rs +++ b/examples/custom_widget/src/main.rs @@ -11,9 +11,7 @@ mod circle { // implemented by `iced_wgpu` and other renderers. use iced_native::layout::{self, Layout}; use iced_native::renderer; - use iced_native::{ - Color, Element, Hasher, Length, Point, Rectangle, Size, Widget, - }; + use iced_native::{Color, Element, Length, Point, Rectangle, Size, Widget}; pub struct Circle { radius: f32, @@ -45,12 +43,6 @@ mod circle { layout::Node::new(Size::new(self.radius * 2.0, self.radius * 2.0)) } - fn hash_layout(&self, state: &mut Hasher) { - use std::hash::Hash; - - self.radius.to_bits().hash(state); - } - fn draw( &self, renderer: &mut Renderer, |