summaryrefslogtreecommitdiffstats
path: root/examples/custom_widget
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-03-07 15:29:43 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-03-07 15:29:43 +0700
commitc35496d80fc542c9beeea39dec98eb5cdef07aaa (patch)
tree62f28fabf631f33a1a94fb25fa076b44140adbe4 /examples/custom_widget
parent820d332736205c7485d08352841b705205130f38 (diff)
parentaf7cbf0003496d757696ea6e15ea32f0649cf8f9 (diff)
downloadiced-c35496d80fc542c9beeea39dec98eb5cdef07aaa.tar.gz
iced-c35496d80fc542c9beeea39dec98eb5cdef07aaa.tar.bz2
iced-c35496d80fc542c9beeea39dec98eb5cdef07aaa.zip
Merge branch 'master' into virtual-widgets
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,