Skip to content

Commit bb187a9

Browse files
committed
---
yaml --- r: 152526 b: refs/heads/try2 c: 09eb95f h: refs/heads/master v: v3
1 parent 321af1b commit bb187a9

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 0642cbbde0e51d5f4465b937ab8ff7d46df02df0
8+
refs/heads/try2: 09eb95f24165b2a7eec6a599b0a4bad86ff6892d
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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)