summaryrefslogtreecommitdiffstats
path: root/examples/custom_widget
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2022-02-23 22:41:22 +0700
committerLibravatar GitHub <noreply@github.com>2022-02-23 22:41:22 +0700
commitaf7cbf0003496d757696ea6e15ea32f0649cf8f9 (patch)
treea586436e4a1076543a3205ebc895a8463d9f7ffe /examples/custom_widget
parent9fe50801537e8fbfd2914f5139b5a609929e25db (diff)
parent1313c94e3bb206f064462bc521f78dbffc2a6cd6 (diff)
downloadiced-af7cbf0003496d757696ea6e15ea32f0649cf8f9.tar.gz
iced-af7cbf0003496d757696ea6e15ea32f0649cf8f9.tar.bz2
iced-af7cbf0003496d757696ea6e15ea32f0649cf8f9.zip
Merge pull request #1263 from iced-rs/remove-hash-layout
Remove `hash_layout` method from `Widget` trait
Diffstat (limited to 'examples/custom_widget')
-rw-r--r--examples/custom_widget/src/main.rs10
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,