From 89d9f1d7d2202029028a487df1dd11b0665a7517 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Sat, 9 Sep 2023 12:24:47 +0200 Subject: Fix majority of unresolved documentation links --- core/src/gradient.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/src/gradient.rs') diff --git a/core/src/gradient.rs b/core/src/gradient.rs index e19622fb..576c9e4d 100644 --- a/core/src/gradient.rs +++ b/core/src/gradient.rs @@ -9,7 +9,7 @@ use std::cmp::Ordering; /// /// For a gradient which can be used as a fill on a canvas, see [`iced_graphics::Gradient`]. pub enum Gradient { - /// A linear gradient interpolates colors along a direction at a specific [`Angle`]. + /// A linear gradient interpolates colors along a direction at a specific angle. Linear(Linear), } -- cgit From 419d9374b79b39293ba9a17967c2356d29377d8f Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 9 Sep 2023 21:08:23 +0200 Subject: Fix outstanding broken intradoc links --- core/src/gradient.rs | 2 -- 1 file changed, 2 deletions(-) (limited to 'core/src/gradient.rs') diff --git a/core/src/gradient.rs b/core/src/gradient.rs index 576c9e4d..4a0d5ea0 100644 --- a/core/src/gradient.rs +++ b/core/src/gradient.rs @@ -6,8 +6,6 @@ use std::cmp::Ordering; #[derive(Debug, Clone, Copy, PartialEq)] /// A fill which transitions colors progressively along a direction, either linearly, radially (TBD), /// or conically (TBD). -/// -/// For a gradient which can be used as a fill on a canvas, see [`iced_graphics::Gradient`]. pub enum Gradient { /// A linear gradient interpolates colors along a direction at a specific angle. Linear(Linear), -- cgit From efd0ff6ded4e647e5fad0964555dbed541a075d7 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Tue, 19 Sep 2023 01:52:25 -0400 Subject: Chore: Apply some minor clippy fixes * Use `.elapsed()` for duration * Use direct iteration without calling `.iter()` and the like * order fields in the `Text` struct creation as declared --- core/src/gradient.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/src/gradient.rs') diff --git a/core/src/gradient.rs b/core/src/gradient.rs index 4a0d5ea0..6a5533f8 100644 --- a/core/src/gradient.rs +++ b/core/src/gradient.rs @@ -94,7 +94,7 @@ impl Linear { mut self, stops: impl IntoIterator, ) -> Self { - for stop in stops.into_iter() { + for stop in stops { self = self.add_stop(stop.offset, stop.color) } -- cgit From 34f07b60273d6cfe13834af54cd0e24d34569387 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 20 Sep 2023 04:11:52 +0200 Subject: Fix `clippy::semicolon_if_nothing_returned` --- core/src/gradient.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/src/gradient.rs') diff --git a/core/src/gradient.rs b/core/src/gradient.rs index 6a5533f8..4711b044 100644 --- a/core/src/gradient.rs +++ b/core/src/gradient.rs @@ -95,7 +95,7 @@ impl Linear { stops: impl IntoIterator, ) -> Self { for stop in stops { - self = self.add_stop(stop.offset, stop.color) + self = self.add_stop(stop.offset, stop.color); } self -- cgit