1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
diff --git a/Cargo.toml b/Cargo.toml
index 55f57c7..dd59d0e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -47,7 +47,8 @@ version = "~1.1"
version = "~1.1"
[dev-dependencies.clap]
-version = "~2.33.0"
+version = "3"
+features = ["cargo"]
[dev-dependencies.docopt]
version = "1.1"
diff --git a/src/lib.rs b/src/lib.rs
index 4a4facf..9c300f4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -117,14 +117,15 @@
//! let m = App::new("stderrlog example")
//! .version(crate_version!())
//! .arg(Arg::with_name("verbosity")
-//! .short("v")
+//! .short('v')
+//! .takes_value(true)
//! .multiple(true)
//! .help("Increase message verbosity"))
//! .arg(Arg::with_name("quiet")
-//! .short("q")
+//! .short('q')
//! .help("Silence all output"))
//! .arg(Arg::with_name("timestamp")
-//! .short("t")
+//! .short('t')
//! .help("prepend log lines with a timestamp")
//! .takes_value(true)
//! .possible_values(&["none", "sec", "ms", "ns"]))
@@ -134,11 +135,7 @@
//! let quiet = m.is_present("quiet");
//! let ts = m.value_of("timestamp").map(|v| {
//! stderrlog::Timestamp::from_str(v).unwrap_or_else(|_| {
-//! clap::Error {
-//! message: "invalid value for 'timestamp'".into(),
-//! kind: clap::ErrorKind::InvalidValue,
-//! info: None,
-//! }.exit()
+//! clap::Error::raw(clap::ErrorKind::InvalidValue, "invalid value for 'timestamp'").exit()
//! })
//! }).unwrap_or(stderrlog::Timestamp::Off);
//!
|