summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-07-09 18:03:59 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-07-09 18:03:59 +0200
commit2f76a10a1d3617e414fb33c0c6cd5cb7782197ad (patch)
treec5c1d4e9e29752abc15d1f3559369e42c1bbb772
parent33a24b58210c88571f789ee27495e3ee3a55e3a4 (diff)
downloadiced-2f76a10a1d3617e414fb33c0c6cd5cb7782197ad.tar.gz
iced-2f76a10a1d3617e414fb33c0c6cd5cb7782197ad.tar.bz2
iced-2f76a10a1d3617e414fb33c0c6cd5cb7782197ad.zip
Fix further `clippy` lints
... and explicitly annotate crates as well.
-rw-r--r--core/src/keyboard/modifiers.rs2
-rw-r--r--core/src/lib.rs17
-rw-r--r--futures/src/lib.rs18
-rw-r--r--futures/src/runtime.rs2
-rw-r--r--futures/src/subscription/tracker.rs10
-rw-r--r--glow/src/lib.rs14
-rw-r--r--glutin/src/lib.rs17
-rw-r--r--graphics/src/lib.rs16
-rw-r--r--lazy/src/component.rs4
-rw-r--r--lazy/src/lib.rs11
-rw-r--r--lazy/src/pure/component.rs4
-rw-r--r--lazy/src/pure/responsive.rs2
-rw-r--r--lazy/src/responsive.rs2
-rw-r--r--native/src/debug/null.rs2
-rw-r--r--native/src/lib.rs18
-rw-r--r--native/src/overlay/menu.rs8
-rw-r--r--native/src/renderer/null.rs2
-rw-r--r--native/src/widget/button.rs2
-rw-r--r--native/src/widget/column.rs6
-rw-r--r--native/src/widget/pick_list.rs10
-rw-r--r--native/src/widget/progress_bar.rs2
-rw-r--r--native/src/widget/row.rs6
-rw-r--r--native/src/widget/scrollable.rs6
-rw-r--r--native/src/widget/slider.rs4
-rw-r--r--native/src/widget/text_input.rs2
-rw-r--r--pure/src/lib.rs16
-rw-r--r--src/lib.rs18
-rw-r--r--style/src/lib.rs10
-rw-r--r--style/src/text.rs8
-rw-r--r--style/src/theme.rs8
-rw-r--r--wgpu/src/backend.rs1
-rw-r--r--wgpu/src/lib.rs16
-rw-r--r--winit/src/lib.rs18
33 files changed, 197 insertions, 85 deletions
diff --git a/core/src/keyboard/modifiers.rs b/core/src/keyboard/modifiers.rs
index ff5b08f2..bbdd8272 100644
--- a/core/src/keyboard/modifiers.rs
+++ b/core/src/keyboard/modifiers.rs
@@ -5,7 +5,7 @@ bitflags! {
#[derive(Default)]
pub struct Modifiers: u32{
/// The "shift" key.
- const SHIFT = 0b100 << 0;
+ const SHIFT = 0b100;
// const LSHIFT = 0b010 << 0;
// const RSHIFT = 0b001 << 0;
//
diff --git a/core/src/lib.rs b/core/src/lib.rs
index 7b0dc57b..03ba8cca 100644
--- a/core/src/lib.rs
+++ b/core/src/lib.rs
@@ -12,11 +12,18 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
-#![deny(missing_docs)]
-#![deny(missing_debug_implementations)]
-#![deny(unused_results)]
-#![forbid(unsafe_code)]
-#![forbid(rust_2018_idioms)]
+#![deny(
+ missing_debug_implementations,
+ missing_docs,
+ unused_results,
+ clippy::extra_unused_lifetimes,
+ clippy::from_over_into,
+ clippy::needless_borrow,
+ clippy::new_without_default,
+ clippy::useless_conversion
+)]
+#![forbid(unsafe_code, rust_2018_idioms)]
+#![allow(clippy::inherent_to_string, clippy::type_complexity)]
pub mod alignment;
pub mod keyboard;
pub mod mouse;
diff --git a/futures/src/lib.rs b/futures/src/lib.rs
index b0b2f6ce..c0982db7 100644
--- a/futures/src/lib.rs
+++ b/futures/src/lib.rs
@@ -4,13 +4,19 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
-#![deny(missing_docs)]
-#![deny(missing_debug_implementations)]
-#![deny(unused_results)]
-#![forbid(unsafe_code)]
-#![forbid(rust_2018_idioms)]
+#![deny(
+ missing_debug_implementations,
+ missing_docs,
+ unused_results,
+ clippy::extra_unused_lifetimes,
+ clippy::from_over_into,
+ clippy::needless_borrow,
+ clippy::new_without_default,
+ clippy::useless_conversion
+)]
+#![forbid(unsafe_code, rust_2018_idioms)]
+#![allow(clippy::inherent_to_string, clippy::type_complexity)]
#![cfg_attr(docsrs, feature(doc_cfg))]
-
pub use futures;
mod command;
diff --git a/futures/src/runtime.rs b/futures/src/runtime.rs
index 34f6b6dd..24f9f241 100644
--- a/futures/src/runtime.rs
+++ b/futures/src/runtime.rs
@@ -66,8 +66,6 @@ where
let future = future.then(|message| async move {
let _ = sender.send(message).await;
-
- ()
});
self.executor.spawn(future);
diff --git a/futures/src/subscription/tracker.rs b/futures/src/subscription/tracker.rs
index 5717fdb9..9fe110b0 100644
--- a/futures/src/subscription/tracker.rs
+++ b/futures/src/subscription/tracker.rs
@@ -156,3 +156,13 @@ where
});
}
}
+
+impl<Hasher, Event> Default for Tracker<Hasher, Event>
+where
+ Hasher: std::hash::Hasher + Default,
+ Event: 'static + Send + Clone,
+{
+ fn default() -> Self {
+ Self::new()
+ }
+}
diff --git a/glow/src/lib.rs b/glow/src/lib.rs
index 043c5b13..de9c0002 100644
--- a/glow/src/lib.rs
+++ b/glow/src/lib.rs
@@ -7,10 +7,18 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
-#![deny(missing_docs)]
-#![deny(missing_debug_implementations)]
-#![deny(unused_results)]
+#![deny(
+ missing_debug_implementations,
+ missing_docs,
+ unused_results,
+ clippy::extra_unused_lifetimes,
+ clippy::from_over_into,
+ clippy::needless_borrow,
+ clippy::new_without_default,
+ clippy::useless_conversion
+)]
#![forbid(rust_2018_idioms)]
+#![allow(clippy::inherent_to_string, clippy::type_complexity)]
#![cfg_attr(docsrs, feature(doc_cfg))]
pub use glow;
diff --git a/glutin/src/lib.rs b/glutin/src/lib.rs
index 146dfc4d..33afd664 100644
--- a/glutin/src/lib.rs
+++ b/glutin/src/lib.rs
@@ -7,11 +7,20 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
-#![deny(missing_docs)]
-#![deny(missing_debug_implementations)]
-#![deny(unused_results)]
-#![deny(unsafe_code)]
+#![deny(
+ missing_docs,
+ missing_debug_implementations,
+ unsafe_code,
+ unused_results,
+ clippy::extra_unused_lifetimes,
+ clippy::from_over_into,
+ clippy::needless_borrow,
+ clippy::new_without_default,
+ clippy::useless_conversion
+)]
#![forbid(rust_2018_idioms)]
+#![allow(clippy::inherent_to_string, clippy::type_complexity)]
+#![cfg_attr(docsrs, feature(doc_cfg))]
pub use glutin;
diff --git a/graphics/src/lib.rs b/graphics/src/lib.rs
index 370f70d6..a7a1cabb 100644
--- a/graphics/src/lib.rs
+++ b/graphics/src/lib.rs
@@ -7,11 +7,19 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
-#![deny(missing_docs)]
-#![deny(missing_debug_implementations)]
-#![deny(unused_results)]
-#![deny(unsafe_code)]
+#![deny(
+ missing_debug_implementations,
+ missing_docs,
+ unsafe_code,
+ unused_results,
+ clippy::extra_unused_lifetimes,
+ clippy::from_over_into,
+ clippy::needless_borrow,
+ clippy::new_without_default,
+ clippy::useless_conversion
+)]
#![forbid(rust_2018_idioms)]
+#![allow(clippy::inherent_to_string, clippy::type_complexity)]
#![cfg_attr(docsrs, feature(doc_cfg))]
mod antialiasing;
mod error;
diff --git a/lazy/src/component.rs b/lazy/src/component.rs
index 2c6b6ffb..847afbd8 100644
--- a/lazy/src/component.rs
+++ b/lazy/src/component.rs
@@ -38,7 +38,7 @@ pub trait Component<Message, Renderer> {
/// Produces the widgets of the [`Component`], which may trigger an [`Event`](Component::Event)
/// on user interaction.
- fn view(&mut self) -> Element<Self::Event, Renderer>;
+ fn view(&mut self) -> Element<'_, Self::Event, Renderer>;
}
/// Turns an implementor of [`Component`] into an [`Element`] that can be
@@ -350,7 +350,7 @@ where
layout: Layout<'_>,
cursor_position: Point,
) {
- self.with_overlay_maybe(|overlay| {
+ let _ = self.with_overlay_maybe(|overlay| {
overlay.draw(renderer, theme, style, layout, cursor_position);
});
}
diff --git a/lazy/src/lib.rs b/lazy/src/lib.rs
index 916f9458..7dc294cf 100644
--- a/lazy/src/lib.rs
+++ b/lazy/src/lib.rs
@@ -1,6 +1,17 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
+#![deny(
+ missing_debug_implementations,
+ unused_results,
+ clippy::extra_unused_lifetimes,
+ clippy::from_over_into,
+ clippy::needless_borrow,
+ clippy::new_without_default,
+ clippy::useless_conversion
+)]
+#![forbid(unsafe_code)]
+#![allow(clippy::inherent_to_string, clippy::type_complexity)]
#![cfg_attr(docsrs, feature(doc_cfg))]
pub mod component;
pub mod responsive;
diff --git a/lazy/src/pure/component.rs b/lazy/src/pure/component.rs
index 9b29b628..b8370263 100644
--- a/lazy/src/pure/component.rs
+++ b/lazy/src/pure/component.rs
@@ -43,7 +43,7 @@ pub trait Component<Message, Renderer> {
/// Produces the widgets of the [`Component`], which may trigger an [`Event`](Component::Event)
/// on user interaction.
- fn view(&self, state: &Self::State) -> Element<Self::Event, Renderer>;
+ fn view(&self, state: &Self::State) -> Element<'_, Self::Event, Renderer>;
}
/// Turns an implementor of [`Component`] into an [`Element`] that can be
@@ -382,7 +382,7 @@ where
layout: Layout<'_>,
cursor_position: Point,
) {
- self.with_overlay_maybe(|overlay| {
+ let _ = self.with_overlay_maybe(|overlay| {
overlay.draw(renderer, theme, style, layout, cursor_position);
});
}
diff --git a/lazy/src/pure/responsive.rs b/lazy/src/pure/responsive.rs
index 96b89fd6..d156f805 100644
--- a/lazy/src/pure/responsive.rs
+++ b/lazy/src/pure/responsive.rs
@@ -341,7 +341,7 @@ where
layout: Layout<'_>,
cursor_position: Point,
) {
- self.with_overlay_maybe(|overlay| {
+ let _ = self.with_overlay_maybe(|overlay| {
overlay.draw(renderer, theme, style, layout, cursor_position);
});
}
diff --git a/lazy/src/responsive.rs b/lazy/src/responsive.rs
index 86c8db6b..d305689d 100644
--- a/lazy/src/responsive.rs
+++ b/lazy/src/responsive.rs
@@ -363,7 +363,7 @@ where
layout: Layout<'_>,
cursor_position: Point,
) {
- self.with_overlay_maybe(|overlay| {
+ let _ = self.with_overlay_maybe(|overlay| {
overlay.draw(renderer, theme, style, layout, cursor_position);
});
}
diff --git a/native/src/debug/null.rs b/native/src/debug/null.rs
index 60e6122d..2db0eebb 100644
--- a/native/src/debug/null.rs
+++ b/native/src/debug/null.rs
@@ -1,5 +1,5 @@
#![allow(missing_docs)]
-#[derive(Debug)]
+#[derive(Debug, Default)]
pub struct Debug;
impl Debug {
diff --git a/native/src/lib.rs b/native/src/lib.rs
index 2d0dd6ec..13173901 100644
--- a/native/src/lib.rs
+++ b/native/src/lib.rs
@@ -31,11 +31,19 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
-#![deny(missing_docs)]
-#![deny(missing_debug_implementations)]
-#![deny(unused_results)]
-#![forbid(unsafe_code)]
-#![forbid(rust_2018_idioms)]
+#![deny(
+ missing_debug_implementations,
+ missing_docs,
+ unused_results,
+ clippy::extra_unused_lifetimes,
+ clippy::from_over_into,
+ clippy::needless_borrow,
+ clippy::new_without_default,
+ clippy::useless_conversion
+)]
+#![forbid(unsafe_code, rust_2018_idioms)]
+#![allow(clippy::inherent_to_string, clippy::type_complexity)]
+#![cfg_attr(docsrs, feature(doc_cfg))]
pub mod clipboard;
pub mod command;
pub mod event;
diff --git a/native/src/overlay/menu.rs b/native/src/overlay/menu.rs
index 0c25200c..fc3f52b2 100644
--- a/native/src/overlay/menu.rs
+++ b/native/src/overlay/menu.rs
@@ -489,15 +489,15 @@ where
}
}
-impl<'a, T, Message, Renderer> Into<Element<'a, Message, Renderer>>
- for List<'a, T, Renderer>
+impl<'a, T, Message, Renderer> From<List<'a, T, Renderer>>
+ for Element<'a, Message, Renderer>
where
T: ToString + Clone,
Message: 'a,
Renderer: 'a + text::Renderer,
Renderer::Theme: StyleSheet,
{
- fn into(self) -> Element<'a, Message, Renderer> {
- Element::new(self)
+ fn from(list: List<'a, T, Renderer>) -> Self {
+ Element::new(list)
}
}
diff --git a/native/src/renderer/null.rs b/native/src/renderer/null.rs
index c591f4e2..b1743dbf 100644
--- a/native/src/renderer/null.rs
+++ b/native/src/renderer/null.rs
@@ -5,7 +5,7 @@ use crate::{Background, Font, Point, Rectangle, Size, Theme, Vector};
/// A renderer that does nothing.
///
/// It can be useful if you are writing tests!
-#[derive(Debug, Clone, Copy)]
+#[derive(Debug, Clone, Copy, Default)]
pub struct Null;
impl Null {
diff --git a/native/src/widget/button.rs b/native/src/widget/button.rs
index d4e88424..a33ee7f7 100644
--- a/native/src/widget/button.rs
+++ b/native/src/widget/button.rs
@@ -382,7 +382,7 @@ where
self.on_press.is_some(),
theme,
self.style,
- || &self.state,
+ || self.state,
);
self.content.draw(
diff --git a/native/src/widget/column.rs b/native/src/widget/column.rs
index 01ddd9f1..4eee7d3c 100644
--- a/native/src/widget/column.rs
+++ b/native/src/widget/column.rs
@@ -102,6 +102,12 @@ impl<'a, Message, Renderer> Column<'a, Message, Renderer> {
}
}
+impl<'a, Message, Renderer> Default for Column<'a, Message, Renderer> {
+ fn default() -> Self {
+ Self::new()
+ }
+}
+
impl<'a, Message, Renderer> Widget<Message, Renderer>
for Column<'a, Message, Renderer>
where
diff --git a/native/src/widget/pick_list.rs b/native/src/widget/pick_list.rs
index e735151e..61b0eb96 100644
--- a/native/src/widget/pick_list.rs
+++ b/native/src/widget/pick_list.rs
@@ -525,7 +525,7 @@ where
) -> Option<overlay::Element<'_, Message, Renderer>> {
overlay(
layout,
- &mut self.state,
+ self.state,
self.padding,
self.text_size,
self.font.clone(),
@@ -535,8 +535,8 @@ where
}
}
-impl<'a, T: 'a, Message, Renderer> Into<Element<'a, Message, Renderer>>
- for PickList<'a, T, Message, Renderer>
+impl<'a, T: 'a, Message, Renderer> From<PickList<'a, T, Message, Renderer>>
+ for Element<'a, Message, Renderer>
where
T: Clone + ToString + Eq,
[T]: ToOwned<Owned = Vec<T>>,
@@ -549,7 +549,7 @@ where
<Renderer::Theme as StyleSheet>::Style:
Into<<Renderer::Theme as menu::StyleSheet>::Style>,
{
- fn into(self) -> Element<'a, Message, Renderer> {
- Element::new(self)
+ fn from(pick_list: PickList<'a, T, Message, Renderer>) -> Self {
+ Element::new(pick_list)
}
}
diff --git a/native/src/widget/progress_bar.rs b/native/src/widget/progress_bar.rs
index 4eb7438a..50bdcda6 100644
--- a/native/src/widget/progress_bar.rs
+++ b/native/src/widget/progress_bar.rs
@@ -76,7 +76,7 @@ where
}
}
-impl<'a, Message, Renderer> Widget<Message, Renderer> for ProgressBar<Renderer>
+impl<Message, Renderer> Widget<Message, Renderer> for ProgressBar<Renderer>
where
Renderer: crate::Renderer,
Renderer::Theme: StyleSheet,
diff --git a/native/src/widget/row.rs b/native/src/widget/row.rs
index 9cff74c6..9d8cc715 100644
--- a/native/src/widget/row.rs
+++ b/native/src/widget/row.rs
@@ -102,6 +102,12 @@ impl<'a, Message, Renderer> Row<'a, Message, Renderer> {
}
}
+impl<'a, Message, Renderer> Default for Row<'a, Message, Renderer> {
+ fn default() -> Self {
+ Self::new()
+ }
+}
+
impl<'a, Message, Renderer> Widget<Message, Renderer>
for Row<'a, Message, Renderer>
where
diff --git a/native/src/widget/scrollable.rs b/native/src/widget/scrollable.rs
index 5d550315..1b255860 100644
--- a/native/src/widget/scrollable.rs
+++ b/native/src/widget/scrollable.rs
@@ -662,7 +662,7 @@ where
shell: &mut Shell<'_, Message>,
) -> event::Status {
update(
- &mut self.state,
+ self.state,
event,
layout,
cursor_position,
@@ -693,7 +693,7 @@ where
renderer: &Renderer,
) -> mouse::Interaction {
mouse_interaction(
- &self.state,
+ self.state,
layout,
cursor_position,
self.scrollbar_width,
@@ -720,7 +720,7 @@ where
_viewport: &Rectangle,
) {
draw(
- &self.state,
+ self.state,
renderer,
theme,
layout,
diff --git a/native/src/widget/slider.rs b/native/src/widget/slider.rs
index c75c1e99..a5ff611c 100644
--- a/native/src/widget/slider.rs
+++ b/native/src/widget/slider.rs
@@ -410,7 +410,7 @@ where
layout,
cursor_position,
shell,
- &mut self.state,
+ self.state,
&mut self.value,
&self.range,
self.step,
@@ -432,7 +432,7 @@ where
renderer,
layout,
cursor_position,
- &self.state,
+ self.state,
self.value,
&self.range,
theme,
diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs
index 835b2b4d..98265ef2 100644
--- a/native/src/widget/text_input.rs
+++ b/native/src/widget/text_input.rs
@@ -176,7 +176,7 @@ where
theme,
layout,
cursor_position,
- &self.state,
+ self.state,
value.unwrap_or(&self.value),
&self.placeholder,
self.size,
diff --git a/pure/src/lib.rs b/pure/src/lib.rs
index 49b23e1b..b8351f48 100644
--- a/pure/src/lib.rs
+++ b/pure/src/lib.rs
@@ -82,10 +82,18 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
-#![deny(missing_docs)]
-#![deny(unused_results)]
-#![forbid(unsafe_code)]
-#![forbid(rust_2018_idioms)]
+#![deny(
+ missing_docs,
+ unused_results,
+ clippy::extra_unused_lifetimes,
+ clippy::from_over_into,
+ clippy::needless_borrow,
+ clippy::new_without_default,
+ clippy::useless_conversion
+)]
+#![forbid(rust_2018_idioms, unsafe_code)]
+#![allow(clippy::inherent_to_string, clippy::type_complexity)]
+#![cfg_attr(docsrs, feature(doc_cfg))]
pub mod flex;
pub mod helpers;
diff --git a/src/lib.rs b/src/lib.rs
index d64941f4..4e8d6787 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -174,12 +174,20 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
-#![deny(missing_docs)]
-#![deny(missing_debug_implementations)]
-#![deny(unused_results)]
-#![forbid(unsafe_code)]
-#![forbid(rust_2018_idioms)]
+#![deny(
+ missing_debug_implementations,
+ missing_docs,
+ unused_results,
+ clippy::extra_unused_lifetimes,
+ clippy::from_over_into,
+ clippy::needless_borrow,
+ clippy::new_without_default,
+ clippy::useless_conversion
+)]
+#![forbid(rust_2018_idioms, unsafe_code)]
+#![allow(clippy::inherent_to_string, clippy::type_complexity)]
#![cfg_attr(docsrs, feature(doc_cfg))]
+
mod element;
mod error;
mod result;
diff --git a/style/src/lib.rs b/style/src/lib.rs
index ee426e98..0dde9582 100644
--- a/style/src/lib.rs
+++ b/style/src/lib.rs
@@ -7,6 +7,16 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
+#![deny(
+ unused_results,
+ clippy::extra_unused_lifetimes,
+ clippy::from_over_into,
+ clippy::needless_borrow,
+ clippy::new_without_default,
+ clippy::useless_conversion
+)]
+#![forbid(unsafe_code, rust_2018_idioms)]
+#![allow(clippy::inherent_to_string, clippy::type_complexity)]
pub use iced_core::{Background, Color};
pub mod application;
diff --git a/style/src/text.rs b/style/src/text.rs
index 69a4ed85..6e3aeef8 100644
--- a/style/src/text.rs
+++ b/style/src/text.rs
@@ -6,13 +6,7 @@ pub trait StyleSheet {
fn appearance(&self, style: Self::Style) -> Appearance;
}
-#[derive(Debug, Clone, Copy)]
+#[derive(Debug, Clone, Copy, Default)]
pub struct Appearance {
pub color: Option<Color>,
}
-
-impl Default for Appearance {
- fn default() -> Self {
- Self { color: None }
- }
-}
diff --git a/style/src/theme.rs b/style/src/theme.rs
index d2de8a5d..5697b240 100644
--- a/style/src/theme.rs
+++ b/style/src/theme.rs
@@ -419,7 +419,7 @@ impl radio::StyleSheet for Theme {
radio::Appearance {
background: Color::TRANSPARENT.into(),
- dot_color: palette.primary.strong.color.into(),
+ dot_color: palette.primary.strong.color,
border_width: 1.0,
border_color: palette.primary.strong.color,
text_color: None,
@@ -431,7 +431,7 @@ impl radio::StyleSheet for Theme {
let palette = self.extended_palette();
radio::Appearance {
- dot_color: palette.primary.strong.color.into(),
+ dot_color: palette.primary.strong.color,
background: palette.primary.weak.color.into(),
..active
}
@@ -599,7 +599,7 @@ impl scrollable::StyleSheet for Theme {
border_width: 0.0,
border_color: Color::TRANSPARENT,
scroller: scrollable::Scroller {
- color: palette.background.strong.color.into(),
+ color: palette.background.strong.color,
border_radius: 2.0,
border_width: 0.0,
border_color: Color::TRANSPARENT,
@@ -616,7 +616,7 @@ impl scrollable::StyleSheet for Theme {
border_width: 0.0,
border_color: Color::TRANSPARENT,
scroller: scrollable::Scroller {
- color: palette.primary.strong.color.into(),
+ color: palette.primary.strong.color,
border_radius: 2.0,
border_width: 0.0,
border_color: Color::TRANSPARENT,
diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs
index b0aa13fe..8c875254 100644
--- a/wgpu/src/backend.rs
+++ b/wgpu/src/backend.rs
@@ -230,7 +230,6 @@ impl Backend {
wgpu_glyph::VerticalAlign::Bottom
}
}),
- ..Default::default()
};
self.text_pipeline.queue(text);
diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs
index d1ad6cd9..3a98c6bd 100644
--- a/wgpu/src/lib.rs
+++ b/wgpu/src/lib.rs
@@ -23,11 +23,19 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
-#![deny(missing_docs)]
-#![deny(missing_debug_implementations)]
-#![deny(unused_results)]
-#![deny(unsafe_code)]
+#![deny(
+ missing_debug_implementations,
+ missing_docs,
+ unsafe_code,
+ unused_results,
+ clippy::extra_unused_lifetimes,
+ clippy::from_over_into,
+ clippy::needless_borrow,
+ clippy::new_without_default,
+ clippy::useless_conversion
+)]
#![forbid(rust_2018_idioms)]
+#![allow(clippy::inherent_to_string, clippy::type_complexity)]
#![cfg_attr(docsrs, feature(doc_cfg))]
pub mod settings;
diff --git a/winit/src/lib.rs b/winit/src/lib.rs
index 22e7efdf..3bde0f2b 100644
--- a/winit/src/lib.rs
+++ b/winit/src/lib.rs
@@ -17,11 +17,19 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
-#![deny(missing_docs)]
-#![deny(missing_debug_implementations)]
-#![deny(unused_results)]
-#![forbid(unsafe_code)]
-#![forbid(rust_2018_idioms)]
+#![deny(
+ missing_debug_implementations,
+ missing_docs,
+ unused_results,
+ clippy::extra_unused_lifetimes,
+ clippy::from_over_into,
+ clippy::needless_borrow,
+ clippy::new_without_default,
+ clippy::useless_conversion
+)]
+#![forbid(rust_2018_idioms, unsafe_code)]
+#![allow(clippy::inherent_to_string, clippy::type_complexity)]
+#![cfg_attr(docsrs, feature(doc_cfg))]
#[doc(no_inline)]
pub use iced_native::*;