Merge pull request #2091 from nyurik/docs

Chore: Apply clippy docs keyword quoting
This commit is contained in:
Héctor Ramón 2023-09-19 13:26:52 +02:00 committed by GitHub
commit 2ee2c65894
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 7 deletions

View file

@ -1,7 +1,7 @@
#[cfg(feature = "palette")] #[cfg(feature = "palette")]
use palette::rgb::{Srgb, Srgba}; 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)] #[derive(Debug, Clone, Copy, PartialEq, Default)]
pub struct Color { pub struct Color {
/// Red component, 0.0 - 1.0 /// Red component, 0.0 - 1.0

View file

@ -3,7 +3,7 @@ use crate::Size;
use std::mem; 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( pub fn from_rgba(
rgba: Vec<u8>, rgba: Vec<u8>,
width: u32, width: u32,

View file

@ -25,7 +25,7 @@ pub type EventStream = BoxStream<(Event, event::Status)>;
/// A [`Subscription`] is normally provided to some runtime, like a `Command`, /// A [`Subscription`] is normally provided to some runtime, like a `Command`,
/// and it will generate events as long as the user keeps requesting it. /// 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. /// connection, keyboard presses, mouse events, time ticks, etc.
#[must_use = "`Subscription` must be returned to runtime to take effect"] #[must_use = "`Subscription` must be returned to runtime to take effect"]
pub struct Subscription<Message> { pub struct Subscription<Message> {
@ -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. /// connection open.
/// ///
/// [`websocket`]: https://github.com/iced-rs/iced/tree/0.10/examples/websocket /// [`websocket`]: https://github.com/iced-rs/iced/tree/0.10/examples/websocket

View file

@ -61,7 +61,7 @@ pub trait Compositor: Sized {
) -> Result<(), SurfaceError>; ) -> Result<(), SurfaceError>;
/// Screenshots the current [`Renderer`] primitives to an offscreen texture, and returns the bytes of /// 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 /// [`Renderer`]: Self::Renderer
fn screenshot<T: AsRef<str>>( fn screenshot<T: AsRef<str>>(

View file

@ -6,7 +6,7 @@ use std::sync::Arc;
/// Data of a screenshot, captured with `window::screenshot()`. /// 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)] #[derive(Clone)]
pub struct Screenshot { pub struct Screenshot {
/// The bytes of the [`Screenshot`]. /// The bytes of the [`Screenshot`].

View file

@ -47,7 +47,7 @@ impl FillMode {
/// ///
/// # Returns /// # Returns
/// ///
/// * (starting_offset, length) /// * (`starting_offset`, `length`)
pub fn fill(&self, space: f32) -> (f32, f32) { pub fn fill(&self, space: f32) -> (f32, f32) {
match *self { match *self {
FillMode::Full => (0.0, space), FillMode::Full => (0.0, space),