Skip to content

Commit

Permalink
Really fix #17982 this time.
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimcn committed Oct 31, 2014
1 parent fd53657 commit e23f5c8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/libterm/win.rs
Expand Up @@ -71,8 +71,7 @@ fn color_to_bits(color: color::Color) -> u16 {
}

fn bits_to_color(bits: u16) -> color::Color {
let bits = bits & 0x7;
let color = match bits {
let color = match bits & 0x7 {
0 => color::BLACK,
0x1 => color::BLUE,
0x2 => color::GREEN,
Expand All @@ -84,11 +83,7 @@ fn bits_to_color(bits: u16) -> color::Color {
_ => unreachable!()
};

if bits >= 8 {
color | 0x8
} else {
color
}
color | (bits & 0x8) // copy the hi-intensity bit
}

impl<T: Writer+Send> WinConsole<T> {
Expand Down

8 comments on commit e23f5c8

@bors
Copy link
Contributor

@bors bors commented on e23f5c8 Nov 1, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at vadimcn@e23f5c8

@bors
Copy link
Contributor

@bors bors commented on e23f5c8 Nov 1, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging vadimcn/rust/17982 = e23f5c8 into auto

@bors
Copy link
Contributor

@bors bors commented on e23f5c8 Nov 1, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vadimcn/rust/17982 = e23f5c8 merged ok, testing candidate = c7d1694

@bors
Copy link
Contributor

@bors bors commented on e23f5c8 Nov 1, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on e23f5c8 Nov 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at vadimcn@e23f5c8

@bors
Copy link
Contributor

@bors bors commented on e23f5c8 Nov 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging vadimcn/rust/17982 = e23f5c8 into auto

@bors
Copy link
Contributor

@bors bors commented on e23f5c8 Nov 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vadimcn/rust/17982 = e23f5c8 merged ok, testing candidate = 0f07aa63

@bors
Copy link
Contributor

@bors bors commented on e23f5c8 Nov 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.