Skip to content

Commit 2cf6770

Browse files
committed
---
yaml --- r: 150431 b: refs/heads/try2 c: 5f33588 h: refs/heads/master i: 150429: f0bacd4 150427: 8de0818 150423: 15495b6 150415: 14bf81b 150399: 2cedc1a v: v3
1 parent 00d7472 commit 2cf6770

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
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: 8ad7e5481f970ba8d1103b4cc20a71335aba466e
8+
refs/heads/try2: 5f33588d75966b939df288cf2125e9906e15cf82
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: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@
8787
#![deny(missing_doc)]
8888
#![deny(deprecated_owned_vector)]
8989

90+
#![allow(visible_private_types)] // NOTE: remove after a stage0 snap
91+
9092
#[cfg(test)] #[phase(syntax, link)] extern crate log;
9193

9294
use std::cmp::Eq;
@@ -130,31 +132,31 @@ pub enum Occur {
130132
#[deriving(Clone, Eq)]
131133
pub struct Opt {
132134
/// Name of the option
133-
name: Name,
135+
pub name: Name,
134136
/// Whether it has an argument
135-
hasarg: HasArg,
137+
pub hasarg: HasArg,
136138
/// How often it can occur
137-
occur: Occur,
139+
pub occur: Occur,
138140
/// Which options it aliases
139-
priv aliases: Vec<Opt> ,
141+
pub aliases: Vec<Opt> ,
140142
}
141143

142144
/// One group of options, e.g., both -h and --help, along with
143145
/// their shared description and properties.
144146
#[deriving(Clone, Eq)]
145147
pub struct OptGroup {
146148
/// Short Name of the `OptGroup`
147-
short_name: ~str,
149+
pub short_name: ~str,
148150
/// Long Name of the `OptGroup`
149-
long_name: ~str,
151+
pub long_name: ~str,
150152
/// Hint
151-
hint: ~str,
153+
pub hint: ~str,
152154
/// Description
153-
desc: ~str,
155+
pub desc: ~str,
154156
/// Whether it has an argument
155-
hasarg: HasArg,
157+
pub hasarg: HasArg,
156158
/// How often it can occur
157-
occur: Occur
159+
pub occur: Occur
158160
}
159161

160162
/// Describes wether an option is given at all or has a value.
@@ -169,11 +171,12 @@ enum Optval {
169171
#[deriving(Clone, Eq)]
170172
pub struct Matches {
171173
/// Options that matched
172-
priv opts: Vec<Opt> ,
174+
opts: Vec<Opt> ,
173175
/// Values of the Options that matched
174-
priv vals: Vec<Vec<Optval> > ,
176+
vals: Vec<Vec<Optval> > ,
175177
/// Free string fragments
176-
free: Vec<~str> }
178+
pub free: Vec<~str>,
179+
}
177180

178181
/// The type returned when the command line does not conform to the
179182
/// expected format. Call the `to_err_msg` method to retrieve the

0 commit comments

Comments
 (0)