提交 224849b0 编写于 作者: B Ben S

Make copyable values copyable

上级 09845ccf
......@@ -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() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册