diff options
author | Benjamin Sago <ogham@bsago.me> | 2015-04-04 00:14:49 +0200 |
---|---|---|
committer | Benjamin Sago <ogham@bsago.me> | 2015-04-04 00:14:56 +0200 |
commit | f88556814566dbc1c1cde626cb8d5933c6db5b92 (patch) | |
tree | 50ed3fc800e79c0945e0323836d1dcabe3b8658c /src/options.rs | |
parent | 8d066994e75f1c9f30ae6a792e0a399763d74779 (diff) |
Upgrade to latest Rust
Still missing a few Beta features, but it compiles!
- Copy requires Clone
- current_dir returns a Path now
- num_cpus moved to a crate
Diffstat (limited to 'src/options.rs')
-rw-r--r-- | src/options.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/options.rs b/src/options.rs index 5a132cf..6ca987a 100644 --- a/src/options.rs +++ b/src/options.rs @@ -19,14 +19,14 @@ use self::Misfire::*; /// The *Options* struct represents a parsed version of the user's /// command-line options. -#[derive(PartialEq, Debug, Copy)] +#[derive(PartialEq, Debug, Copy, Clone)] pub struct Options { pub dir_action: DirAction, pub filter: FileFilter, pub view: View, } -#[derive(PartialEq, Debug, Copy)] +#[derive(PartialEq, Debug, Copy, Clone)] pub struct FileFilter { list_dirs_first: bool, reverse: bool, @@ -34,7 +34,7 @@ pub struct FileFilter { sort_field: SortField, } -#[derive(PartialEq, Debug, Copy)] +#[derive(PartialEq, Debug, Copy, Clone)] pub enum View { Details(Details), Lines, @@ -160,7 +160,7 @@ impl FileFilter { } /// User-supplied field to sort by. -#[derive(PartialEq, Debug, Copy)] +#[derive(PartialEq, Debug, Copy, Clone)] pub enum SortField { Unsorted, Name, Extension, Size, FileInode, ModifiedDate, AccessedDate, CreatedDate, @@ -362,7 +362,7 @@ impl TimeType { } } -#[derive(PartialEq, Debug, Copy)] +#[derive(PartialEq, Debug, Copy, Clone)] pub struct TimeTypes { accessed: bool, modified: bool, @@ -413,7 +413,7 @@ impl TimeTypes { } /// What to do when encountering a directory? -#[derive(PartialEq, Debug, Copy)] +#[derive(PartialEq, Debug, Copy, Clone)] pub enum DirAction { AsFile, List, @@ -458,7 +458,7 @@ impl DirAction { } } -#[derive(PartialEq, Debug, Copy)] +#[derive(PartialEq, Debug, Copy, Clone)] pub struct RecurseOptions { pub tree: bool, pub max_depth: Option<usize>, @@ -492,7 +492,7 @@ impl RecurseOptions { } } -#[derive(PartialEq, Copy, Debug)] +#[derive(PartialEq, Copy, Clone, Debug)] pub struct Columns { size_format: SizeFormat, time_types: TimeTypes, |