This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 89
Examples don't compile any more #109
Comments
#108 fixes this |
Seems to be working just fine for me:
Could you please provide more information to reproduce your problem? |
I got the same. I did notice two versions of rustc-serialize being compiled. Maybe that is the root.
Caused by the following code static USAGE: &'static str = "Rusty Horde
Usage:
rh [(-v | --verbose) --no-color]
rh -h | --help [--no-color]
rh --version [--no-color]
Options:
-v --verbose Turn on debug logging.
--no-color Turn off colored output.
-h --help Show this message.
--version Show version information.";
#[derive(RustcDecodable)]
struct RhArgs {
flag_verbose: bool,
flag_no_color: bool,
flag_version: bool,
flag_help: bool,
}
let dargs: RhArgs = Docopt::new(USAGE)
.and_then(|d| Ok(d.help(false)))
.and_then(|d| d.argv(args).decode())
.unwrap_or_else(|e| e.exit()); |
I, too, had two versions of rustc-serialize. |
Yeah, pinning the version in my Cargo.toml to 0.2 worked. rustc-serialize = "0.2" instead of rustc-serialize = "*" |
OK, standard IO lives! |
Thanks Andrew! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is the one I tried: https://github.com/docopt/docopt.rs/blob/master/examples/cargo.rs
Rustc says that the trait
rustc-serialize::serialize::Decodable
is not implemented for the typeArgs
.The text was updated successfully, but these errors were encountered: