From c6554d990770b941b5003d6ef40af3f9dedcd052 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Tue, 19 Sep 2023 01:50:05 -0400 Subject: Chore: Apply clippy docs keyword quoting Add quotes a number of doc strings like `sRGB` --- style/src/rule.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'style/src') diff --git a/style/src/rule.rs b/style/src/rule.rs index afae085c..efbe7444 100644 --- a/style/src/rule.rs +++ b/style/src/rule.rs @@ -47,7 +47,7 @@ impl FillMode { /// /// # Returns /// - /// * (starting_offset, length) + /// * (`starting_offset`, `length`) pub fn fill(&self, space: f32) -> (f32, f32) { match *self { FillMode::Full => (0.0, space), -- cgit From 42ed90bc6f92b2085d193e7f143430b8d3847c21 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 20 Sep 2023 04:51:08 +0200 Subject: Fix `clippy::default_trait_access` --- style/src/theme.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'style/src') diff --git a/style/src/theme.rs b/style/src/theme.rs index 893d7202..3c1f2de6 100644 --- a/style/src/theme.rs +++ b/style/src/theme.rs @@ -393,7 +393,7 @@ impl container::StyleSheet for Theme { fn appearance(&self, style: &Self::Style) -> container::Appearance { match style { - Container::Transparent => Default::default(), + Container::Transparent => container::Appearance::default(), Container::Box => { let palette = self.extended_palette(); @@ -904,7 +904,7 @@ impl svg::StyleSheet for Theme { fn appearance(&self, style: &Self::Style) -> svg::Appearance { match style { - Svg::Default => Default::default(), + Svg::Default => svg::Appearance::default(), Svg::Custom(custom) => custom.appearance(self), } } @@ -1053,7 +1053,7 @@ impl text::StyleSheet for Theme { fn appearance(&self, style: Self::Style) -> text::Appearance { match style { - Text::Default => Default::default(), + Text::Default => text::Appearance::default(), Text::Color(c) => text::Appearance { color: Some(c) }, } } -- cgit From f137d71e8fb926e784680d56d1cfa6817c3710a1 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 20 Sep 2023 16:40:03 +0200 Subject: Centralize `clippy` lints in `.cargo/config.toml` --- style/src/lib.rs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'style/src') diff --git a/style/src/lib.rs b/style/src/lib.rs index 0c555ed8..30f17a44 100644 --- a/style/src/lib.rs +++ b/style/src/lib.rs @@ -10,16 +10,10 @@ #![forbid(unsafe_code, rust_2018_idioms)] #![deny( unused_results, - clippy::extra_unused_lifetimes, - clippy::from_over_into, - clippy::needless_borrow, - clippy::new_without_default, - clippy::useless_conversion, missing_docs, unused_results, rustdoc::broken_intra_doc_links )] -#![allow(clippy::inherent_to_string, clippy::type_complexity)] pub use iced_core as core; pub mod application; -- cgit