diff options
Diffstat (limited to 'examples/custom_widget')
-rw-r--r-- | examples/custom_widget/Cargo.toml | 2 | ||||
-rw-r--r-- | examples/custom_widget/src/main.rs | 10 |
2 files changed, 2 insertions, 10 deletions
diff --git a/examples/custom_widget/Cargo.toml b/examples/custom_widget/Cargo.toml index 86b0d2a9..067aab4a 100644 --- a/examples/custom_widget/Cargo.toml +++ b/examples/custom_widget/Cargo.toml @@ -2,7 +2,7 @@ name = "custom_widget" version = "0.1.0" authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"] -edition = "2018" +edition = "2021" publish = false [dependencies] 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, |