Skip to content

Commit

Permalink
Merge branch 'master' of github.com:kbknapp/clap-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
kbknapp committed Feb 27, 2017
2 parents 5568c07 + 5ee2665 commit 10c1d1b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A simple to use, efficient, and full featured Command Line Argument Parser
"""

[dependencies]
bitflags = "0.7.0"
bitflags = "0.8.0"
vec_map = "0.6.0"
unicode-width = "0.1.4"
unicode-segmentation = "1.0.1"
Expand All @@ -29,7 +29,7 @@ clippy = { version = "~0.0.112", optional = true }
atty = { version = "0.2.2", optional = true }

[dev-dependencies]
regex = "~0.1.80"
regex = "0.2"

[features]
default = ["suggestions", "color", "wrap_help"]
Expand Down
6 changes: 3 additions & 3 deletions clap-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ mod test {
S2: AsRef<str> {
let re = Regex::new("\x1b[^m]*m").unwrap();
// Strip out any mismatching \r character on windows that might sneak in on either side
let left = re.replace_all(&l.as_ref().trim().replace("\r", "")[..], "");
let right = re.replace_all(&r.as_ref().trim().replace("\r", "")[..], "");
let left = re.replace_all(&l.as_ref().trim().replace("\r", "")[..], "").into_owned();
let right = re.replace_all(&r.as_ref().trim().replace("\r", "")[..], "").into_owned();
let b = left == right;
if !b {
println!("");
Expand Down Expand Up @@ -69,4 +69,4 @@ mod test {
.arg_from_usage("-o --option [scoption]... 'tests options'")
.arg_from_usage("[scpositional] 'tests positionals'"))
}
}
}
6 changes: 4 additions & 2 deletions src/app/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,11 +571,13 @@ pub enum AppSettings {
/// ```
/// Now doing the same thing, but *not* using any subcommands will result in the value not being
/// propagated down.
///
/// ```rust
/// # use clap::{App, Arg, AppSettings};
/// # use clap::{App, Arg, AppSettings, SubCommand};
/// let m = App::new("myprog")
/// .setting(AppSettings::PropagateGlobalValuesDown)
/// .global_arg(Arg::from_usage("<cmd> 'command to run'"))
/// .arg(Arg::from_usage("[cmd] 'command to run'")
/// .global(true))
/// .subcommand(SubCommand::with_name("foo"))
/// .get_matches_from(vec!["myprog", "set"]);
///
Expand Down
2 changes: 2 additions & 0 deletions src/args/arg_matches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,8 @@ impl<'a> DoubleEndedIterator for Values<'a> {
fn next_back(&mut self) -> Option<&'a str> { self.iter.next_back() }
}

impl<'a> ExactSizeIterator for Values<'a> {}

/// An iterator over the key-value pairs of a map.
#[derive(Clone)]
pub struct Iter<'a, V: 'a> {
Expand Down

0 comments on commit 10c1d1b

Please sign in to comment.