diff --git a/Makefile b/Makefile index 7a3f270..af8c41c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -LIBNAME := $(shell rustc --crate-file-name argparse/mod.rs) +LIBNAME := $(shell rustc --print-file-name argparse/mod.rs) all: argparse-lib diff --git a/argparse/mod.rs b/argparse/mod.rs index 6c38687..6bf1502 100644 --- a/argparse/mod.rs +++ b/argparse/mod.rs @@ -1,4 +1,4 @@ -#![crate_id = "argparse#0.1"] +#![crate_name = "argparse"] #![crate_type = "dylib"] extern crate collections; diff --git a/argparse/parser.rs b/argparse/parser.rs index dc47422..9123fd5 100644 --- a/argparse/parser.rs +++ b/argparse/parser.rs @@ -661,7 +661,7 @@ impl<'parser> ArgumentParser<'parser> { fail!("Bad short argument {}", name); } self.short_options.insert( - name[1] as char, opt.clone()); + name.as_bytes()[1] as char, opt.clone()); } } }