Skip to content

Commit

Permalink
usize is Copy
Browse files Browse the repository at this point in the history
  • Loading branch information
ogham committed Jun 25, 2017
1 parent 183ed9c commit b8bb148
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/options/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl Mode {
let term_colours = TerminalColours::deduce(matches)?;
let term_width = TerminalWidth::deduce()?;

if let Some(&width) = term_width.as_ref() {
if let Some(width) = term_width.width() {
let colours = match term_colours {
TerminalColours::Always |
TerminalColours::Automatic => Colours::colourful(colour_scale()),
Expand Down Expand Up @@ -230,11 +230,11 @@ impl TerminalWidth {
}
}

fn as_ref(&self) -> Option<&usize> {
fn width(&self) -> Option<usize> {
match *self {
TerminalWidth::Set(ref width)
| TerminalWidth::Terminal(ref width) => Some(width),
TerminalWidth::Unset => None,
TerminalWidth::Set(width) |
TerminalWidth::Terminal(width) => Some(width),
TerminalWidth::Unset => None,
}
}
}
Expand Down

0 comments on commit b8bb148

Please sign in to comment.