@@ -100,7 +100,7 @@ use std::result;
100
100
use std:: string:: String ;
101
101
102
102
/// Name of an option. Either a string or a single char.
103
- #[ deriving( Clone , PartialEq ) ]
103
+ #[ deriving( Clone , PartialEq , Eq ) ]
104
104
pub enum Name {
105
105
/// A string representing the long name of an option.
106
106
/// For example: "help"
@@ -111,7 +111,7 @@ pub enum Name {
111
111
}
112
112
113
113
/// Describes whether an option has an argument.
114
- #[ deriving( Clone , PartialEq ) ]
114
+ #[ deriving( Clone , PartialEq , Eq ) ]
115
115
pub enum HasArg {
116
116
/// The option requires an argument.
117
117
Yes ,
@@ -122,7 +122,7 @@ pub enum HasArg {
122
122
}
123
123
124
124
/// Describes how often an option may occur.
125
- #[ deriving( Clone , PartialEq ) ]
125
+ #[ deriving( Clone , PartialEq , Eq ) ]
126
126
pub enum Occur {
127
127
/// The option occurs once.
128
128
Req ,
@@ -133,7 +133,7 @@ pub enum Occur {
133
133
}
134
134
135
135
/// A description of a possible option.
136
- #[ deriving( Clone , PartialEq ) ]
136
+ #[ deriving( Clone , PartialEq , Eq ) ]
137
137
pub struct Opt {
138
138
/// Name of the option
139
139
pub name : Name ,
@@ -142,12 +142,12 @@ pub struct Opt {
142
142
/// How often it can occur
143
143
pub occur : Occur ,
144
144
/// Which options it aliases
145
- pub aliases : Vec < Opt > ,
145
+ pub aliases : Vec < Opt > ,
146
146
}
147
147
148
148
/// One group of options, e.g., both -h and --help, along with
149
149
/// their shared description and properties.
150
- #[ deriving( Clone , PartialEq ) ]
150
+ #[ deriving( Clone , PartialEq , Eq ) ]
151
151
pub struct OptGroup {
152
152
/// Short Name of the `OptGroup`
153
153
pub short_name : String ,
@@ -164,28 +164,28 @@ pub struct OptGroup {
164
164
}
165
165
166
166
/// Describes whether an option is given at all or has a value.
167
- #[ deriving( Clone , PartialEq ) ]
167
+ #[ deriving( Clone , PartialEq , Eq ) ]
168
168
enum Optval {
169
169
Val ( String ) ,
170
170
Given ,
171
171
}
172
172
173
173
/// The result of checking command line arguments. Contains a vector
174
174
/// of matches and a vector of free strings.
175
- #[ deriving( Clone , PartialEq ) ]
175
+ #[ deriving( Clone , PartialEq , Eq ) ]
176
176
pub struct Matches {
177
177
/// Options that matched
178
- opts : Vec < Opt > ,
178
+ opts : Vec < Opt > ,
179
179
/// Values of the Options that matched
180
- vals : Vec < Vec < Optval > > ,
180
+ vals : Vec < Vec < Optval > > ,
181
181
/// Free string fragments
182
182
pub free : Vec < String > ,
183
183
}
184
184
185
185
/// The type returned when the command line does not conform to the
186
186
/// expected format. Use the `Show` implementation to output detailed
187
187
/// information.
188
- #[ deriving( Clone , PartialEq ) ]
188
+ #[ deriving( Clone , PartialEq , Eq ) ]
189
189
pub enum Fail_ {
190
190
/// The option requires an argument but none was passed.
191
191
ArgumentMissing ( String ) ,
@@ -200,7 +200,7 @@ pub enum Fail_ {
200
200
}
201
201
202
202
/// The type of failure that occurred.
203
- #[ deriving( PartialEq ) ]
203
+ #[ deriving( PartialEq , Eq ) ]
204
204
#[ allow( missing_doc) ]
205
205
pub enum FailType {
206
206
ArgumentMissing_ ,
0 commit comments