Skip to content

Commit

Permalink
Fix compilation regression for 1.34
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtlawrence committed Feb 24, 2020
1 parent 7e75fda commit 24ba05b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

# 1.9.3 (February 24, 2020)
- Fix compilation regression for 1.34.0. Thanks @jlevon for reporting.

# 1.9.2 (January 11, 2020)
- Exposed `ColoredString` data through methods for purposes of interrogating the applied colours.
- Increased documentation.
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ impl ColoredString {
/// assert_eq!(cstr.fgcolor(), None);
/// ```
pub fn fgcolor(&self) -> Option<Color> {
self.fgcolor.as_ref().copied()
self.fgcolor.as_ref().map(|x| *x)
}

/// Get the current background color applied.
Expand All @@ -321,7 +321,7 @@ impl ColoredString {
/// assert_eq!(cstr.bgcolor(), None);
/// ```
pub fn bgcolor(&self) -> Option<Color> {
self.bgcolor.as_ref().copied()
self.bgcolor.as_ref().map(|x| *x)
}

/// Get the current [`Style`] which can be check if it contains a [`Styles`].
Expand Down

0 comments on commit 24ba05b

Please sign in to comment.