Make copyable values copyable

This commit is contained in:
Ben S 2014-12-14 18:22:56 +00:00
parent 09845ccf20
commit 224849b0e9
3 changed files with 8 additions and 0 deletions

View File

@ -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 {

View File

@ -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",

View File

@ -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() {