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; use ansi_term::Style;
#[derive(PartialEq, Show)] #[derive(PartialEq, Debug, Copy)]
pub enum Column { pub enum Column {
Permissions, Permissions,
FileName, FileName,
@ -14,25 +14,20 @@ pub enum Column {
Inode, Inode,
} }
impl Copy for Column { } #[derive(PartialEq, Debug, Copy)]
#[derive(PartialEq, Show)]
pub enum SizeFormat { pub enum SizeFormat {
DecimalBytes, DecimalBytes,
BinaryBytes, BinaryBytes,
JustBytes, JustBytes,
} }
impl Copy for SizeFormat { }
/// Each column can pick its own **Alignment**. Usually, numbers are /// Each column can pick its own **Alignment**. Usually, numbers are
/// right-aligned, and text is left-aligned. /// right-aligned, and text is left-aligned.
#[derive(Copy)]
pub enum Alignment { pub enum Alignment {
Left, Right, Left, Right,
} }
impl Copy for Alignment { }
impl Column { impl Column {
/// Get the alignment this column should use. /// 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::Style::Plain;
use ansi_term::Colour::{Red, Green, Yellow, Blue, Cyan, Fixed}; use ansi_term::Colour::{Red, Green, Yellow, Blue, Cyan, Fixed};
#[derive(Copy)]
pub enum FileType { pub enum FileType {
Normal, Directory, Executable, Immediate, Compiled, Symlink, Special, Normal, Directory, Executable, Immediate, Compiled, Symlink, Special,
Image, Video, Music, Lossless, Compressed, Document, Temp, Crypto, Image, Video, Music, Lossless, Compressed, Document, Temp, Crypto,
} }
impl Copy for FileType { }
static IMAGE_TYPES: &'static [&'static str] = &[ static IMAGE_TYPES: &'static [&'static str] = &[
"png", "jpeg", "jpg", "gif", "bmp", "tiff", "tif", "png", "jpeg", "jpg", "gif", "bmp", "tiff", "tif",
"ppm", "pgm", "pbm", "pnm", "webp", "raw", "arw", "ppm", "pgm", "pbm", "pnm", "webp", "raw", "arw",

View File

@ -109,13 +109,11 @@ impl Options {
} }
/// User-supplied field to sort by /// User-supplied field to sort by
#[derive(PartialEq, Debug)] #[derive(PartialEq, Debug, Copy)]
pub enum SortField { pub enum SortField {
Unsorted, Name, Extension, Size, FileInode Unsorted, Name, Extension, Size, FileInode
} }
impl Copy for SortField { }
impl SortField { impl SortField {
/// Find which field to use based on a user-supplied word. /// 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; use ansi_term::Style::Plain;
#[derive(PartialEq, Show)] #[derive(PartialEq, Debug)]
pub enum View { pub enum View {
Details(Vec<Column>, bool), Details(Vec<Column>, bool),
Lines, Lines,