Skip to content

Commit 642445a

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 163662 b: refs/heads/snap-stage3 c: c407785 h: refs/heads/master v: v3
1 parent 76d246d commit 642445a

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 9146a919b616e39e528e4d7100d16eef52f1f852
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 4c62c76ef99aab3a752c4ebd74b63819cabee98f
4+
refs/heads/snap-stage3: c407785ac0b535dc98e9bf2d9c595111cfff31cc
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/libgetopts/lib.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ pub enum Name {
118118
}
119119

120120
/// Describes whether an option has an argument.
121-
#[deriving(Clone, PartialEq, Eq)]
121+
#[deriving(Clone, Copy, PartialEq, Eq)]
122122
pub enum HasArg {
123123
/// The option requires an argument.
124124
Yes,
@@ -128,10 +128,8 @@ pub enum HasArg {
128128
Maybe,
129129
}
130130

131-
impl Copy for HasArg {}
132-
133131
/// Describes how often an option may occur.
134-
#[deriving(Clone, PartialEq, Eq)]
132+
#[deriving(Clone, Copy, PartialEq, Eq)]
135133
pub enum Occur {
136134
/// The option occurs once.
137135
Req,
@@ -141,8 +139,6 @@ pub enum Occur {
141139
Multi,
142140
}
143141

144-
impl Copy for Occur {}
145-
146142
/// A description of a possible option.
147143
#[deriving(Clone, PartialEq, Eq)]
148144
pub struct Opt {
@@ -211,7 +207,7 @@ pub enum Fail {
211207
}
212208

213209
/// The type of failure that occurred.
214-
#[deriving(PartialEq, Eq)]
210+
#[deriving(Copy, PartialEq, Eq)]
215211
#[allow(missing_docs)]
216212
pub enum FailType {
217213
ArgumentMissing_,
@@ -221,8 +217,6 @@ pub enum FailType {
221217
UnexpectedArgument_,
222218
}
223219

224-
impl Copy for FailType {}
225-
226220
/// The result of parsing a command line with a set of options.
227221
pub type Result = result::Result<Matches, Fail>;
228222

@@ -839,22 +833,22 @@ pub fn short_usage(program_name: &str, opts: &[OptGroup]) -> String {
839833
line
840834
}
841835

836+
#[deriving(Copy)]
842837
enum SplitWithinState {
843838
A, // leading whitespace, initial state
844839
B, // words
845840
C, // internal and trailing whitespace
846841
}
847-
impl Copy for SplitWithinState {}
842+
#[deriving(Copy)]
848843
enum Whitespace {
849844
Ws, // current char is whitespace
850845
Cr // current char is not whitespace
851846
}
852-
impl Copy for Whitespace {}
847+
#[deriving(Copy)]
853848
enum LengthLimit {
854849
UnderLim, // current char makes current substring still fit in limit
855850
OverLim // current char makes current substring no longer fit in limit
856851
}
857-
impl Copy for LengthLimit {}
858852

859853

860854
/// Splits a string into substrings with possibly internal whitespace,

0 commit comments

Comments
 (0)