From 484fdf2b5270611f236ec6bac996e131852a0e31 Mon Sep 17 00:00:00 2001 From: jam1garner Date: Tue, 10 Sep 2024 11:48:03 -0400 Subject: [PATCH] Rewrite doc paragraphs to be smaller --- src/dyn_colors.rs | 7 ++++--- src/dyn_styles.rs | 5 +++-- src/styles.rs | 17 +++++++---------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/dyn_colors.rs b/src/dyn_colors.rs index 3e9f01d..582371e 100644 --- a/src/dyn_colors.rs +++ b/src/dyn_colors.rs @@ -4,9 +4,10 @@ use crate::{ }; use core::fmt; -/// An enum describing runtime-configurable colors which can be displayed using [`FgDynColorDisplay`](FgDynColorDisplay) -/// or [`BgDynColorDisplay`](BgDynColorDisplay), allowing for multiple types of colors to be used -/// at runtime. +/// An enum describing runtime-configurable colors +/// +/// This can be displayed using [`FgDynColorDisplay`](FgDynColorDisplay) or [`BgDynColorDisplay`](BgDynColorDisplay), +/// allowing for multiple types of colors to be used at runtime. #[allow(missing_docs)] #[derive(Copy, Clone, PartialEq, Eq, Debug)] pub enum DynColors { diff --git a/src/dyn_styles.rs b/src/dyn_styles.rs index 5a5ad12..fb4e827 100644 --- a/src/dyn_styles.rs +++ b/src/dyn_styles.rs @@ -64,8 +64,9 @@ pub struct Styled { pub style: Style, } -/// A pre-computed style that can be applied to a struct using [`OwoColorize::style`]. Its -/// interface mimics that of [`OwoColorize`], but instead of chaining methods on your +/// A pre-computed style that can be applied to a struct using [`OwoColorize::style`]. +/// +/// Its interface mimics that of [`OwoColorize`], but instead of chaining methods on your /// object, you instead chain them on the `Style` object before applying it. /// /// ```rust diff --git a/src/styles.rs b/src/styles.rs index f4f036a..b1d53e0 100644 --- a/src/styles.rs +++ b/src/styles.rs @@ -31,43 +31,40 @@ pub struct BoldDisplay<'a, T>(pub &'a T); pub struct DimDisplay<'a, T>(pub &'a T); /// Transparent wrapper around a type which implements all the formatters the wrapped type does, -/// with the addition of italicizing it. Recommended to be constructed using +/// with the addition of italics. Recommended to be constructed using /// [`OwoColorize`](OwoColorize::italic). #[repr(transparent)] pub struct ItalicDisplay<'a, T>(pub &'a T); /// Transparent wrapper around a type which implements all the formatters the wrapped type does, -/// with the addition of underlining it. Recommended to be constructed using +/// while underlining it. Recommended to be constructed using /// [`OwoColorize`](OwoColorize::underline). #[repr(transparent)] pub struct UnderlineDisplay<'a, T>(pub &'a T); /// Transparent wrapper around a type which implements all the formatters the wrapped type does, -/// with the addition of making it blink. Recommended to be constructed using +/// while blinking. Recommended to be constructed using /// [`OwoColorize`](OwoColorize::blink). #[repr(transparent)] pub struct BlinkDisplay<'a, T>(pub &'a T); /// Transparent wrapper around a type which implements all the formatters the wrapped type does, -/// with the addition of making it blink fast. Recommended to be constructed using -/// [`OwoColorize`](OwoColorize::blink_fast). +/// with the addition of making it blink fast. Use [`OwoColorize`](OwoColorize::blink_fast) #[repr(transparent)] pub struct BlinkFastDisplay<'a, T>(pub &'a T); /// Transparent wrapper around a type which implements all the formatters the wrapped type does, -/// with the addition of swapping foreground and background colors. Recommended to be constructed -/// using [`OwoColorize`](OwoColorize::reversed). +/// with the addition of swapping fg and bg colors. Use [`OwoColorize`](OwoColorize::reversed) #[repr(transparent)] pub struct ReversedDisplay<'a, T>(pub &'a T); /// Transparent wrapper around a type which implements all the formatters the wrapped type does, -/// with the addition of hiding the text. Recommended to be constructed -/// using [`OwoColorize`](OwoColorize::reversed). +/// with the addition of hiding the text. Use [`OwoColorize`](OwoColorize::hidden). #[repr(transparent)] pub struct HiddenDisplay<'a, T>(pub &'a T); /// Transparent wrapper around a type which implements all the formatters the wrapped type does, -/// with the addition of crossing out the given text. Recommended to be constructed using +/// crossed out. Recommended to be constructed using /// [`OwoColorize`](OwoColorize::strikethrough). #[repr(transparent)] pub struct StrikeThroughDisplay<'a, T>(pub &'a T);