diff options
author | 2023-09-09 21:16:55 +0200 | |
---|---|---|
committer | 2023-09-09 21:16:55 +0200 | |
commit | e3aa8f71e6d27135ddc3bddf2a141fe42375b3f9 (patch) | |
tree | 2fd3b5f27ff4ac185a105ddce1a8f26b1b5b276b /graphics | |
parent | 89d9c45d25e9bf89e48858b135bc7a2d41c757a8 (diff) | |
parent | 419d9374b79b39293ba9a17967c2356d29377d8f (diff) | |
download | iced-e3aa8f71e6d27135ddc3bddf2a141fe42375b3f9.tar.gz iced-e3aa8f71e6d27135ddc3bddf2a141fe42375b3f9.tar.bz2 iced-e3aa8f71e6d27135ddc3bddf2a141fe42375b3f9.zip |
Merge pull request #2077 from matze/fix-doc-links
Fix majority of unresolved documentation links
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/src/compositor.rs | 2 | ||||
-rw-r--r-- | graphics/src/geometry.rs | 4 | ||||
-rw-r--r-- | graphics/src/geometry/fill.rs | 4 | ||||
-rw-r--r-- | graphics/src/geometry/stroke.rs | 4 | ||||
-rw-r--r-- | graphics/src/gradient.rs | 11 | ||||
-rw-r--r-- | graphics/src/lib.rs | 5 | ||||
-rw-r--r-- | graphics/src/mesh.rs | 2 |
7 files changed, 16 insertions, 16 deletions
diff --git a/graphics/src/compositor.rs b/graphics/src/compositor.rs index f7b86045..7173ffa7 100644 --- a/graphics/src/compositor.rs +++ b/graphics/src/compositor.rs @@ -63,7 +63,7 @@ pub trait Compositor: Sized { /// Screenshots the current [`Renderer`] primitives to an offscreen texture, and returns the bytes of /// the texture ordered as `RGBA` in the sRGB color space. /// - /// [`Renderer`]: Self::Renderer; + /// [`Renderer`]: Self::Renderer fn screenshot<T: AsRef<str>>( &mut self, renderer: &mut Self::Renderer, diff --git a/graphics/src/geometry.rs b/graphics/src/geometry.rs index 7cd3dd3a..d7d6a0aa 100644 --- a/graphics/src/geometry.rs +++ b/graphics/src/geometry.rs @@ -14,11 +14,11 @@ pub use text::Text; pub use crate::gradient::{self, Gradient}; -/// A renderer capable of drawing some [`Geometry`]. +/// A renderer capable of drawing some [`Self::Geometry`]. pub trait Renderer: crate::core::Renderer { /// The kind of geometry this renderer can draw. type Geometry; - /// Draws the given layers of [`Geometry`]. + /// Draws the given layers of [`Self::Geometry`]. fn draw(&mut self, layers: Vec<Self::Geometry>); } diff --git a/graphics/src/geometry/fill.rs b/graphics/src/geometry/fill.rs index b773c99b..670fbc12 100644 --- a/graphics/src/geometry/fill.rs +++ b/graphics/src/geometry/fill.rs @@ -1,4 +1,6 @@ -//! Fill [crate::widget::canvas::Geometry] with a certain style. +//! Fill [`Geometry`] with a certain style. +//! +//! [`Geometry`]: super::Renderer::Geometry pub use crate::geometry::Style; use crate::core::Color; diff --git a/graphics/src/geometry/stroke.rs b/graphics/src/geometry/stroke.rs index 69a76e1c..aff49ab3 100644 --- a/graphics/src/geometry/stroke.rs +++ b/graphics/src/geometry/stroke.rs @@ -1,4 +1,6 @@ -//! Create lines from a [crate::widget::canvas::Path] and assigns them various attributes/styles. +//! Create lines from a [`Path`] and assigns them various attributes/styles. +//! +//! [`Path`]: super::Path pub use crate::geometry::Style; use iced_core::Color; diff --git a/graphics/src/gradient.rs b/graphics/src/gradient.rs index 4db565d8..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. +//! 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. @@ -53,7 +48,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, diff --git a/graphics/src/lib.rs b/graphics/src/lib.rs index af374a2f..4e814eb0 100644 --- a/graphics/src/lib.rs +++ b/graphics/src/lib.rs @@ -7,6 +7,7 @@ #![doc( html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg" )] +#![forbid(rust_2018_idioms)] #![deny( missing_debug_implementations, missing_docs, @@ -16,9 +17,9 @@ clippy::from_over_into, clippy::needless_borrow, clippy::new_without_default, - clippy::useless_conversion + clippy::useless_conversion, + rustdoc::broken_intra_doc_links )] -#![forbid(rust_2018_idioms)] #![allow(clippy::inherent_to_string, clippy::type_complexity)] #![cfg_attr(docsrs, feature(doc_auto_cfg))] mod antialiasing; diff --git a/graphics/src/mesh.rs b/graphics/src/mesh.rs index cfb5a60f..041986cf 100644 --- a/graphics/src/mesh.rs +++ b/graphics/src/mesh.rs @@ -41,7 +41,7 @@ impl Damage for Mesh { } } -/// A set of [`Vertex2D`] and indices representing a list of triangles. +/// A set of vertices and indices representing a list of triangles. #[derive(Clone, Debug, PartialEq, Eq)] pub struct Indexed<T> { /// The vertices of the mesh |