From c6554d990770b941b5003d6ef40af3f9dedcd052 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Tue, 19 Sep 2023 01:50:05 -0400 Subject: [PATCH] Chore: Apply clippy docs keyword quoting Add quotes a number of doc strings like `sRGB` --- core/src/color.rs | 2 +- core/src/window/icon.rs | 2 +- futures/src/subscription.rs | 4 ++-- graphics/src/compositor.rs | 2 +- runtime/src/window/screenshot.rs | 2 +- style/src/rule.rs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/color.rs b/core/src/color.rs index 1392f28b6f..0e8b7475b8 100644 --- a/core/src/color.rs +++ b/core/src/color.rs @@ -1,7 +1,7 @@ #[cfg(feature = "palette")] use palette::rgb::{Srgb, Srgba}; -/// A color in the sRGB color space. +/// A color in the `sRGB` color space. #[derive(Debug, Clone, Copy, PartialEq, Default)] pub struct Color { /// Red component, 0.0 - 1.0 diff --git a/core/src/window/icon.rs b/core/src/window/icon.rs index 2fc48e3bcd..5ef0eed7d0 100644 --- a/core/src/window/icon.rs +++ b/core/src/window/icon.rs @@ -3,7 +3,7 @@ use crate::Size; use std::mem; -/// Builds an [`Icon`] from its RGBA pixels in the sRGB color space. +/// Builds an [`Icon`] from its RGBA pixels in the `sRGB` color space. pub fn from_rgba( rgba: Vec, width: u32, diff --git a/futures/src/subscription.rs b/futures/src/subscription.rs index d40125e3a3..7163248dc8 100644 --- a/futures/src/subscription.rs +++ b/futures/src/subscription.rs @@ -25,7 +25,7 @@ pub type EventStream = BoxStream<(Event, event::Status)>; /// A [`Subscription`] is normally provided to some runtime, like a `Command`, /// and it will generate events as long as the user keeps requesting it. /// -/// For instance, you can use a [`Subscription`] to listen to a WebSocket +/// For instance, you can use a [`Subscription`] to listen to a `WebSocket` /// connection, keyboard presses, mouse events, time ticks, etc. #[must_use = "`Subscription` must be returned to runtime to take effect"] pub struct Subscription { @@ -355,7 +355,7 @@ where /// } /// ``` /// -/// Check out the [`websocket`] example, which showcases this pattern to maintain a WebSocket +/// Check out the [`websocket`] example, which showcases this pattern to maintain a `WebSocket` /// connection open. /// /// [`websocket`]: https://github.com/iced-rs/iced/tree/0.10/examples/websocket diff --git a/graphics/src/compositor.rs b/graphics/src/compositor.rs index 7173ffa79d..0222a80f01 100644 --- a/graphics/src/compositor.rs +++ b/graphics/src/compositor.rs @@ -61,7 +61,7 @@ pub trait Compositor: Sized { ) -> Result<(), SurfaceError>; /// Screenshots the current [`Renderer`] primitives to an offscreen texture, and returns the bytes of - /// the texture ordered as `RGBA` in the sRGB color space. + /// the texture ordered as `RGBA` in the `sRGB` color space. /// /// [`Renderer`]: Self::Renderer fn screenshot>( diff --git a/runtime/src/window/screenshot.rs b/runtime/src/window/screenshot.rs index c84286b68a..21e0471888 100644 --- a/runtime/src/window/screenshot.rs +++ b/runtime/src/window/screenshot.rs @@ -6,7 +6,7 @@ use std::sync::Arc; /// Data of a screenshot, captured with `window::screenshot()`. /// -/// The `bytes` of this screenshot will always be ordered as `RGBA` in the sRGB color space. +/// The `bytes` of this screenshot will always be ordered as `RGBA` in the `sRGB` color space. #[derive(Clone)] pub struct Screenshot { /// The bytes of the [`Screenshot`]. diff --git a/style/src/rule.rs b/style/src/rule.rs index afae085c6d..efbe74447f 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),