Skip to content

Commit

Permalink
Keep line length below 79 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm committed Jun 4, 2019
1 parent 9a826b2 commit f968d37
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1511,10 +1511,12 @@ impl ColorSpec {
&self,
console: &mut wincolor::Console,
) -> io::Result<()> {
if let Some((intense, color)) = self.fg_color.and_then(|c| c.to_windows(self.intense)) {
let fg_color = self.fg_color.and_then(|c| c.to_windows(self.intense));
if let Some((intense, color)) = fg_color {
console.fg(intense, color)?;
}
if let Some((intense, color)) = self.bg_color.and_then(|c| c.to_windows(self.intense)) {
let bg_color = self.bg_color.and_then(|c| c.to_windows(self.intense));
if let Some((intense, color)) = bg_color {
console.bg(intense, color)?;
}
Ok(())
Expand Down Expand Up @@ -1562,7 +1564,10 @@ pub enum Color {
impl Color {
/// Translate this color to a wincolor::Color.
#[cfg(windows)]
fn to_windows(self, intense: bool) -> Option<(wincolor::Intense, wincolor::Color)> {
fn to_windows(
self,
intense: bool,
) -> Option<(wincolor::Intense, wincolor::Color)> {
use wincolor::Intense::{Yes, No};

let color = match self {
Expand Down

0 comments on commit f968d37

Please sign in to comment.