mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-16 09:17:09 +00:00
usize is Copy
This commit is contained in:
parent
183ed9c135
commit
b8bb148fbb
@ -108,7 +108,7 @@ impl Mode {
|
|||||||
let term_colours = TerminalColours::deduce(matches)?;
|
let term_colours = TerminalColours::deduce(matches)?;
|
||||||
let term_width = TerminalWidth::deduce()?;
|
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 {
|
let colours = match term_colours {
|
||||||
TerminalColours::Always |
|
TerminalColours::Always |
|
||||||
TerminalColours::Automatic => Colours::colourful(colour_scale()),
|
TerminalColours::Automatic => Colours::colourful(colour_scale()),
|
||||||
@ -230,10 +230,10 @@ impl TerminalWidth {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn as_ref(&self) -> Option<&usize> {
|
fn width(&self) -> Option<usize> {
|
||||||
match *self {
|
match *self {
|
||||||
TerminalWidth::Set(ref width)
|
TerminalWidth::Set(width) |
|
||||||
| TerminalWidth::Terminal(ref width) => Some(width),
|
TerminalWidth::Terminal(width) => Some(width),
|
||||||
TerminalWidth::Unset => None,
|
TerminalWidth::Unset => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user