Update docopt dependency to 0.8.0.

This breaks our depending on two different versions of the regex
library.

This updated docopt uses serde instead of rustc_serialize.
This commit is contained in:
Jakob Stoklund Olesen
2017-06-14 10:35:01 -07:00
parent 454910407f
commit 897c363714
2 changed files with 10 additions and 7 deletions

View File

@@ -16,8 +16,9 @@ path = "src/cton-util.rs"
cretonne = { path = "lib/cretonne" } cretonne = { path = "lib/cretonne" }
cretonne-reader = { path = "lib/reader" } cretonne-reader = { path = "lib/reader" }
filecheck = { path = "lib/filecheck" } filecheck = { path = "lib/filecheck" }
docopt = "0.6.86" docopt = "0.8.0"
rustc-serialize = "0.3.19" serde = "1.0.8"
num_cpus = "1.1.0" serde_derive = "1.0.8"
num_cpus = "1.5.1"
[workspace] [workspace]

View File

@@ -2,7 +2,9 @@
extern crate cretonne; extern crate cretonne;
extern crate cton_reader; extern crate cton_reader;
extern crate docopt; extern crate docopt;
extern crate rustc_serialize; extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate filecheck; extern crate filecheck;
extern crate num_cpus; extern crate num_cpus;
@@ -34,7 +36,7 @@ Options:
"; ";
#[derive(RustcDecodable, Debug)] #[derive(Deserialize, Debug)]
struct Args { struct Args {
cmd_test: bool, cmd_test: bool,
cmd_cat: bool, cmd_cat: bool,
@@ -49,12 +51,12 @@ pub type CommandResult = Result<(), String>;
/// Parse the command line arguments and run the requested command. /// Parse the command line arguments and run the requested command.
fn cton_util() -> CommandResult { fn cton_util() -> CommandResult {
// Parse comand line arguments. // Parse command line arguments.
let args: Args = Docopt::new(USAGE) let args: Args = Docopt::new(USAGE)
.and_then(|d| { .and_then(|d| {
d.help(true) d.help(true)
.version(Some(format!("Cretonne {}", VERSION))) .version(Some(format!("Cretonne {}", VERSION)))
.decode() .deserialize()
}) })
.unwrap_or_else(|e| e.exit()); .unwrap_or_else(|e| e.exit());