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