mirror of https://github.com/ctz/rustls
Update docopt to 0.8.
This commit is contained in:
parent
5e3d95c48f
commit
d941cf407a
|
@ -27,8 +27,9 @@ dangerous_configuration = []
|
|||
log = "0.3.7"
|
||||
env_logger = "0.4.2"
|
||||
mio = "0.6"
|
||||
docopt = "0.7"
|
||||
rustc-serialize = "0.3"
|
||||
docopt = "0.8"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
webpki-roots = "0.11"
|
||||
ct-logs = "0.1"
|
||||
regex = "0.2"
|
||||
|
|
|
@ -13,7 +13,8 @@ use std::io::{Read, Write, BufReader};
|
|||
|
||||
extern crate env_logger;
|
||||
|
||||
extern crate rustc_serialize;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
extern crate docopt;
|
||||
use docopt::Docopt;
|
||||
|
||||
|
@ -305,7 +306,7 @@ Options:
|
|||
--help, -h Show this screen.
|
||||
";
|
||||
|
||||
#[derive(Debug, RustcDecodable)]
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct Args {
|
||||
flag_port: Option<u16>,
|
||||
flag_http: bool,
|
||||
|
@ -474,7 +475,7 @@ fn main() {
|
|||
let args: Args = Docopt::new(USAGE)
|
||||
.and_then(|d| Ok(d.help(true)))
|
||||
.and_then(|d| Ok(d.version(Some(version))))
|
||||
.and_then(|d| d.decode())
|
||||
.and_then(|d| d.deserialize())
|
||||
.unwrap_or_else(|e| e.exit());
|
||||
|
||||
if args.flag_verbose {
|
||||
|
|
|
@ -12,7 +12,8 @@ use std::net;
|
|||
use std::io::{Write, Read, BufReader};
|
||||
use std::collections::HashMap;
|
||||
|
||||
extern crate rustc_serialize;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
extern crate docopt;
|
||||
use docopt::Docopt;
|
||||
|
||||
|
@ -406,7 +407,7 @@ Options:
|
|||
--help, -h Show this screen.
|
||||
";
|
||||
|
||||
#[derive(Debug, RustcDecodable)]
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct Args {
|
||||
cmd_echo: bool,
|
||||
cmd_http: bool,
|
||||
|
@ -532,7 +533,7 @@ fn main() {
|
|||
let args: Args = Docopt::new(USAGE)
|
||||
.and_then(|d| Ok(d.help(true)))
|
||||
.and_then(|d| Ok(d.version(Some(version))))
|
||||
.and_then(|d| d.decode())
|
||||
.and_then(|d| d.deserialize())
|
||||
.unwrap_or_else(|e| e.exit());
|
||||
|
||||
if args.flag_verbose {
|
||||
|
|
Loading…
Reference in New Issue