From f88556814566dbc1c1cde626cb8d5933c6db5b92 Mon Sep 17 00:00:00 2001 From: Benjamin Sago Date: Sat, 4 Apr 2015 00:14:49 +0200 Subject: 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 --- src/options.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/options.rs') 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, @@ -492,7 +492,7 @@ impl RecurseOptions { } } -#[derive(PartialEq, Copy, Debug)] +#[derive(PartialEq, Copy, Clone, Debug)] pub struct Columns { size_format: SizeFormat, time_types: TimeTypes, -- cgit v1.2.3