mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-25 21:37:33 +00:00
Make copyable values copyable
This commit is contained in:
parent
09845ccf20
commit
224849b0e9
@ -9,6 +9,8 @@ pub enum Column {
|
||||
Inode,
|
||||
}
|
||||
|
||||
impl Copy for Column { }
|
||||
|
||||
// Each column can pick its own alignment. Usually, numbers are
|
||||
// right-aligned, and text is left-aligned.
|
||||
|
||||
@ -16,6 +18,8 @@ pub enum Alignment {
|
||||
Left, Right,
|
||||
}
|
||||
|
||||
impl Copy for Alignment { }
|
||||
|
||||
impl Column {
|
||||
pub fn alignment(&self) -> Alignment {
|
||||
match *self {
|
||||
|
@ -13,6 +13,8 @@ pub enum FileType {
|
||||
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",
|
||||
|
@ -12,6 +12,8 @@ pub enum SortField {
|
||||
Unsorted, Name, Extension, Size, FileInode
|
||||
}
|
||||
|
||||
impl Copy for SortField { }
|
||||
|
||||
impl SortField {
|
||||
fn from_word(word: String) -> SortField {
|
||||
match word.as_slice() {
|
||||
|
Loading…
Reference in New Issue
Block a user