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 --- graphics/src/gradient.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'graphics/src/gradient.rs') diff --git a/graphics/src/gradient.rs b/graphics/src/gradient.rs index 4db565d8..f5f5f8b4 100644 --- a/graphics/src/gradient.rs +++ b/graphics/src/gradient.rs @@ -1,4 +1,4 @@ -//! A gradient that can be used as a [`Fill`] for some geometry. +//! A gradient that can be used as a fill for some geometry. //! //! For a gradient that you can use as a background variant for a widget, see [`Gradient`]. //! @@ -53,7 +53,7 @@ pub struct Linear { } impl Linear { - /// Creates a new [`Builder`]. + /// Creates a new [`Linear`] builder. pub fn new(start: Point, end: Point) -> Self { Self { start, -- 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 --- graphics/src/gradient.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'graphics/src/gradient.rs') diff --git a/graphics/src/gradient.rs b/graphics/src/gradient.rs index f5f5f8b4..b274ec86 100644 --- a/graphics/src/gradient.rs +++ b/graphics/src/gradient.rs @@ -1,8 +1,6 @@ //! A gradient that can be used as a fill for some geometry. //! //! For a gradient that you can use as a background variant for a widget, see [`Gradient`]. -//! -//! [`Gradient`]: crate::core::Gradient; use crate::color; use crate::core::gradient::ColorStop; use crate::core::{self, Color, Point, Rectangle}; @@ -36,10 +34,7 @@ impl Gradient { } } -/// A linear gradient that can be used in the style of [`Fill`] or [`Stroke`]. -/// -/// [`Fill`]: crate::geometry::Fill; -/// [`Stroke`]: crate::geometry::Stroke; +/// A linear gradient. #[derive(Debug, Clone, Copy, PartialEq)] pub struct Linear { /// The absolute starting position of the gradient. -- 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 --- graphics/src/gradient.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'graphics/src/gradient.rs') diff --git a/graphics/src/gradient.rs b/graphics/src/gradient.rs index b274ec86..7460e12e 100644 --- a/graphics/src/gradient.rs +++ b/graphics/src/gradient.rs @@ -87,7 +87,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` --- graphics/src/gradient.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'graphics/src/gradient.rs') diff --git a/graphics/src/gradient.rs b/graphics/src/gradient.rs index 7460e12e..603f1b4a 100644 --- a/graphics/src/gradient.rs +++ b/graphics/src/gradient.rs @@ -88,7 +88,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