From 1313c94e3bb206f064462bc521f78dbffc2a6cd6 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 22 Feb 2022 14:10:49 +0700 Subject: Remove `hash_layout` method from `Widget` trait --- examples/custom_widget/src/main.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'examples/custom_widget') 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, -- cgit