From ef5f46bcddffb191bde5dd2df131bdd1197a1e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n?= Date: Thu, 3 Jun 2021 20:28:36 +0700 Subject: [PATCH] Use intra-doc links in `Toggler` docs --- native/src/widget/toggler.rs | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/native/src/widget/toggler.rs b/native/src/widget/toggler.rs index d565bda1..4035276c 100644 --- a/native/src/widget/toggler.rs +++ b/native/src/widget/toggler.rs @@ -22,7 +22,6 @@ use crate::{ /// /// Toggler::new(is_active, String::from("Toggle me!"), |b| Message::TogglerToggled(b)); /// ``` -/// #[allow(missing_debug_implementations)] pub struct Toggler { is_active: bool, @@ -48,8 +47,6 @@ impl /// * a function that will be called when the [`Toggler`] is toggled. It /// will receive the new state of the [`Toggler`] and must produce a /// `Message`. - /// - /// [`Toggler`]: struct.Toggler.html pub fn new( is_active: bool, label: impl Into>, @@ -73,57 +70,42 @@ impl } /// Sets the size of the [`Toggler`]. - /// - /// [`Toggler`]: struct.Toggler.html pub fn size(mut self, size: u16) -> Self { self.size = size; self } /// Sets the width of the [`Toggler`]. - /// - /// [`Toggler`]: struct.Toggler.html pub fn width(mut self, width: Length) -> Self { self.width = width; self } /// Sets the text size o the [`Toggler`]. - /// - /// [`Toggler`]: struct.Toggler.html pub fn text_size(mut self, text_size: u16) -> Self { self.text_size = Some(text_size); self } /// Sets the horizontal alignment of the text of the [`Toggler`] - /// - /// [`Toggler`]: struct.Toggler.html pub fn text_alignment(mut self, alignment: HorizontalAlignment) -> Self { self.text_alignment = alignment; self } /// Sets the spacing between the [`Toggler`] and the text. - /// - /// [`Toggler`]: struct.Toggler.html pub fn spacing(mut self, spacing: u16) -> Self { self.spacing = spacing; self } /// Sets the [`Font`] of the text of the [`Toggler`] - /// - /// [`Toggler`]: struct.Toggler.html - /// [`Font`]: ../../struct.Font.html pub fn font(mut self, font: Renderer::Font) -> Self { self.font = font; self } /// Sets the style of the [`Toggler`]. - /// - /// [`Toggler`]: struct.Toggler.html pub fn style(mut self, style: impl Into) -> Self { self.style = style.into(); self @@ -255,15 +237,12 @@ where /// Your [renderer] will need to implement this trait before being /// able to use a [`Toggler`] in your user interface. /// -/// [`Toggler`]: struct.Toggler.html /// [renderer]: ../../renderer/index.html pub trait Renderer: crate::Renderer { /// The style supported by this renderer. type Style: Default; /// The default size of a [`Toggler`]. - /// - /// [`Toggler`]: struct.Toggler.html const DEFAULT_SIZE: u16; /// Draws a [`Toggler`]. @@ -274,8 +253,6 @@ pub trait Renderer: crate::Renderer { /// * whether the mouse is over the [`Toggler`] or not /// * the drawn label of the [`Toggler`] /// * the style of the [`Toggler`] - /// - /// [`Toggler`]: struct.Toggler.html fn draw( &mut self, bounds: Rectangle,