Skip to content

Commit

Permalink
Rewrite doc paragraphs to be smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
jam1garner committed Sep 10, 2024
1 parent 8b2c15a commit 484fdf2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
7 changes: 4 additions & 3 deletions src/dyn_colors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions src/dyn_styles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ pub struct Styled<T> {
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
Expand Down
17 changes: 7 additions & 10 deletions src/styles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 484fdf2

Please sign in to comment.