diff options
author | 2022-03-07 15:29:43 +0700 | |
---|---|---|
committer | 2022-03-07 15:29:43 +0700 | |
commit | c35496d80fc542c9beeea39dec98eb5cdef07aaa (patch) | |
tree | 62f28fabf631f33a1a94fb25fa076b44140adbe4 /native/src/widget/slider.rs | |
parent | 820d332736205c7485d08352841b705205130f38 (diff) | |
parent | af7cbf0003496d757696ea6e15ea32f0649cf8f9 (diff) | |
download | iced-c35496d80fc542c9beeea39dec98eb5cdef07aaa.tar.gz iced-c35496d80fc542c9beeea39dec98eb5cdef07aaa.tar.bz2 iced-c35496d80fc542c9beeea39dec98eb5cdef07aaa.zip |
Merge branch 'master' into virtual-widgets
Diffstat (limited to 'native/src/widget/slider.rs')
-rw-r--r-- | native/src/widget/slider.rs | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/native/src/widget/slider.rs b/native/src/widget/slider.rs index e41e895d..4c56083e 100644 --- a/native/src/widget/slider.rs +++ b/native/src/widget/slider.rs @@ -7,11 +7,10 @@ use crate::mouse; use crate::renderer; use crate::touch; use crate::{ - Background, Clipboard, Color, Element, Hasher, Layout, Length, Point, - Rectangle, Shell, Size, Widget, + Background, Clipboard, Color, Element, Layout, Length, Point, Rectangle, + Shell, Size, Widget, }; -use std::hash::Hash; use std::ops::RangeInclusive; pub use iced_style::slider::{Handle, HandleShape, Style, StyleSheet}; @@ -344,14 +343,6 @@ pub fn mouse_interaction( } } -/// Hashes the layout of a [`Slider`]. -pub fn hash_layout(state: &mut Hasher, width: Length) { - struct Marker; - std::any::TypeId::of::<Marker>().hash(state); - - width.hash(state); -} - /// The local state of a [`Slider`]. #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub struct State { @@ -444,10 +435,6 @@ where ) -> mouse::Interaction { mouse_interaction(layout, cursor_position, &self.state) } - - fn hash_layout(&self, state: &mut Hasher) { - hash_layout(state, self.width) - } } impl<'a, T, Message, Renderer> From<Slider<'a, T, Message>> |