Skip to content

Commit 325ed66

Browse files
committed
---
yaml --- r: 117236 b: refs/heads/master c: 09eb95f h: refs/heads/master v: v3
1 parent a2aa097 commit 325ed66

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 0642cbbde0e51d5f4465b937ab8ff7d46df02df0
2+
refs/heads/master: 09eb95f24165b2a7eec6a599b0a4bad86ff6892d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: d6736a1440d42f6af967a8a20ab8d73522112b72
55
refs/heads/try: 009d898a9422ac04c1aa60c0e9aff3abc5fa4672

trunk/src/libgetopts/lib.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ use std::result;
100100
use std::string::String;
101101

102102
/// Name of an option. Either a string or a single char.
103-
#[deriving(Clone, PartialEq)]
103+
#[deriving(Clone, PartialEq, Eq)]
104104
pub enum Name {
105105
/// A string representing the long name of an option.
106106
/// For example: "help"
@@ -111,7 +111,7 @@ pub enum Name {
111111
}
112112

113113
/// Describes whether an option has an argument.
114-
#[deriving(Clone, PartialEq)]
114+
#[deriving(Clone, PartialEq, Eq)]
115115
pub enum HasArg {
116116
/// The option requires an argument.
117117
Yes,
@@ -122,7 +122,7 @@ pub enum HasArg {
122122
}
123123

124124
/// Describes how often an option may occur.
125-
#[deriving(Clone, PartialEq)]
125+
#[deriving(Clone, PartialEq, Eq)]
126126
pub enum Occur {
127127
/// The option occurs once.
128128
Req,
@@ -133,7 +133,7 @@ pub enum Occur {
133133
}
134134

135135
/// A description of a possible option.
136-
#[deriving(Clone, PartialEq)]
136+
#[deriving(Clone, PartialEq, Eq)]
137137
pub struct Opt {
138138
/// Name of the option
139139
pub name: Name,
@@ -142,12 +142,12 @@ pub struct Opt {
142142
/// How often it can occur
143143
pub occur: Occur,
144144
/// Which options it aliases
145-
pub aliases: Vec<Opt> ,
145+
pub aliases: Vec<Opt>,
146146
}
147147

148148
/// One group of options, e.g., both -h and --help, along with
149149
/// their shared description and properties.
150-
#[deriving(Clone, PartialEq)]
150+
#[deriving(Clone, PartialEq, Eq)]
151151
pub struct OptGroup {
152152
/// Short Name of the `OptGroup`
153153
pub short_name: String,
@@ -164,28 +164,28 @@ pub struct OptGroup {
164164
}
165165

166166
/// Describes whether an option is given at all or has a value.
167-
#[deriving(Clone, PartialEq)]
167+
#[deriving(Clone, PartialEq, Eq)]
168168
enum Optval {
169169
Val(String),
170170
Given,
171171
}
172172

173173
/// The result of checking command line arguments. Contains a vector
174174
/// of matches and a vector of free strings.
175-
#[deriving(Clone, PartialEq)]
175+
#[deriving(Clone, PartialEq, Eq)]
176176
pub struct Matches {
177177
/// Options that matched
178-
opts: Vec<Opt> ,
178+
opts: Vec<Opt>,
179179
/// Values of the Options that matched
180-
vals: Vec<Vec<Optval> > ,
180+
vals: Vec<Vec<Optval>>,
181181
/// Free string fragments
182182
pub free: Vec<String>,
183183
}
184184

185185
/// The type returned when the command line does not conform to the
186186
/// expected format. Use the `Show` implementation to output detailed
187187
/// information.
188-
#[deriving(Clone, PartialEq)]
188+
#[deriving(Clone, PartialEq, Eq)]
189189
pub enum Fail_ {
190190
/// The option requires an argument but none was passed.
191191
ArgumentMissing(String),
@@ -200,7 +200,7 @@ pub enum Fail_ {
200200
}
201201

202202
/// The type of failure that occurred.
203-
#[deriving(PartialEq)]
203+
#[deriving(PartialEq, Eq)]
204204
#[allow(missing_doc)]
205205
pub enum FailType {
206206
ArgumentMissing_,

0 commit comments

Comments
 (0)