Update #[derive] names

This commit is contained in:
Ben S 2015-01-26 00:27:06 +00:00
parent 8e33c75355
commit 22a4dc90b9
4 changed files with 6 additions and 14 deletions

View File

@ -2,7 +2,7 @@ use std::iter::repeat;
use ansi_term::Style;
#[derive(PartialEq, Show)]
#[derive(PartialEq, Debug, Copy)]
pub enum Column {
Permissions,
FileName,
@ -14,25 +14,20 @@ pub enum Column {
Inode,
}
impl Copy for Column { }
#[derive(PartialEq, Show)]
#[derive(PartialEq, Debug, Copy)]
pub enum SizeFormat {
DecimalBytes,
BinaryBytes,
JustBytes,
}
impl Copy for SizeFormat { }
/// Each column can pick its own **Alignment**. Usually, numbers are
/// right-aligned, and text is left-aligned.
#[derive(Copy)]
pub enum Alignment {
Left, Right,
}
impl Copy for Alignment { }
impl Column {
/// Get the alignment this column should use.

View File

@ -8,13 +8,12 @@ use ansi_term::Style;
use ansi_term::Style::Plain;
use ansi_term::Colour::{Red, Green, Yellow, Blue, Cyan, Fixed};
#[derive(Copy)]
pub enum FileType {
Normal, Directory, Executable, Immediate, Compiled, Symlink, Special,
Image, Video, Music, Lossless, Compressed, Document, Temp, Crypto,
}
impl Copy for FileType { }
static IMAGE_TYPES: &'static [&'static str] = &[
"png", "jpeg", "jpg", "gif", "bmp", "tiff", "tif",
"ppm", "pgm", "pbm", "pnm", "webp", "raw", "arw",

View File

@ -109,13 +109,11 @@ impl Options {
}
/// User-supplied field to sort by
#[derive(PartialEq, Debug)]
#[derive(PartialEq, Debug, Copy)]
pub enum SortField {
Unsorted, Name, Extension, Size, FileInode
}
impl Copy for SortField { }
impl SortField {
/// Find which field to use based on a user-supplied word.

View File

@ -8,7 +8,7 @@ use users::OSUsers;
use ansi_term::Style::Plain;
#[derive(PartialEq, Show)]
#[derive(PartialEq, Debug)]
pub enum View {
Details(Vec<Column>, bool),
Lines,