Skip to content

Commit

Permalink
Updated the documentation for Style::infix() and Colour::infix() to m…
Browse files Browse the repository at this point in the history
…ake clear

which is the current style/colour and which is the next one.
  • Loading branch information
manuthambi committed Aug 9, 2019
1 parent 8e04242 commit 1a528b5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/ansi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ impl Style {
Prefix(self)
}

/// The infix bytes between this style and another. These are the bytes
/// that tell the terminal to either use a different colour or font style
/// _or_ to reset entirely, depending on the two styles.
/// The infix bytes between this style and `next` style. These are the bytes
/// that tell the terminal to change the style to `next`. These may include
/// a reset followed by the next colour and style, depending on the two styles.
///
/// # Examples
///
Expand All @@ -188,8 +188,8 @@ impl Style {
/// assert_eq!("",
/// style.infix(style).to_string());
/// ```
pub fn infix(self, other: Style) -> Infix {
Infix(self, other)
pub fn infix(self, next: Style) -> Infix {
Infix(self, next)
}

/// The suffix for this style. These are the bytes that tell the terminal
Expand Down Expand Up @@ -237,8 +237,8 @@ impl Colour {
Prefix(self.normal())
}

/// The infix bytes between this style and another. These are the bytes
/// that tell the terminal to use the second colour, or to do nothing if
/// The infix bytes between this colour and `next` colour. These are the bytes
/// that tell the terminal to use the `next` colour, or to do nothing if
/// the two colours are equal.
///
/// See also [`Style::infix`](struct.Style.html#method.infix).
Expand All @@ -251,8 +251,8 @@ impl Colour {
/// assert_eq!("\x1b[33m",
/// Red.infix(Yellow).to_string());
/// ```
pub fn infix(self, other: Colour) -> Infix {
Infix(self.normal(), other.normal())
pub fn infix(self, next: Colour) -> Infix {
Infix(self.normal(), next.normal())
}

/// The suffix for this colour as a `Style`. These are the bytes that
Expand Down

0 comments on commit 1a528b5

Please sign in to comment.