mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-26 22:06:26 +00:00
Update #[derive] names
This commit is contained in:
parent
8e33c75355
commit
22a4dc90b9
@ -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.
|
||||
|
@ -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",
|
||||
|
@ -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.
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user