diff options
author | 2023-02-24 13:58:17 +0100 | |
---|---|---|
committer | 2023-02-24 13:58:17 +0100 | |
commit | 8059c40142d601588e01c152ce1bb72a1295dde8 (patch) | |
tree | 191cb7cc7807a5fe513b3d485b2fda21d3bf0bde /native | |
parent | 700262e05c76e003158acfeb8edd9f6b026d78cf (diff) | |
download | iced-8059c40142d601588e01c152ce1bb72a1295dde8.tar.gz iced-8059c40142d601588e01c152ce1bb72a1295dde8.tar.bz2 iced-8059c40142d601588e01c152ce1bb72a1295dde8.zip |
Fix `clippy` lints
Diffstat (limited to 'native')
-rw-r--r-- | native/src/overlay/menu.rs | 2 | ||||
-rw-r--r-- | native/src/widget/checkbox.rs | 2 | ||||
-rw-r--r-- | native/src/widget/pick_list.rs | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/native/src/overlay/menu.rs b/native/src/overlay/menu.rs index 0509f7bc..bd58a122 100644 --- a/native/src/overlay/menu.rs +++ b/native/src/overlay/menu.rs @@ -451,7 +451,7 @@ where let text_size = self.text_size.unwrap_or_else(|| renderer.default_size()); let option_height = - (text_size * 1.2 + f32::from(self.padding.vertical())) as usize; + (text_size * 1.2 + self.padding.vertical()) as usize; let offset = viewport.y - bounds.y; let start = (offset / option_height as f32) as usize; diff --git a/native/src/widget/checkbox.rs b/native/src/widget/checkbox.rs index 6ba06d3b..cd8b9c6b 100644 --- a/native/src/widget/checkbox.rs +++ b/native/src/widget/checkbox.rs @@ -272,7 +272,7 @@ where if self.is_checked { renderer.fill_text(text::Text { content: &code_point.to_string(), - font: font.clone(), + font: *font, size, bounds: Rectangle { x: bounds.center_x(), diff --git a/native/src/widget/pick_list.rs b/native/src/widget/pick_list.rs index b4cda748..8ff82f3b 100644 --- a/native/src/widget/pick_list.rs +++ b/native/src/widget/pick_list.rs @@ -600,12 +600,12 @@ pub fn draw<'a, T, Renderer>( font, code_point, size, - }) => Some((font.clone(), *code_point, *size)), + }) => Some((*font, *code_point, *size)), Handle::Dynamic { open, closed } => { if state().is_open { - Some((open.font.clone(), open.code_point, open.size)) + Some((open.font, open.code_point, open.size)) } else { - Some((closed.font.clone(), closed.code_point, closed.size)) + Some((closed.font, closed.code_point, closed.size)) } } Handle::None => None, |