From 7beaa7c9b1fd2e3a42a4de3cb094191952babf6d Mon Sep 17 00:00:00 2001 From: kagia Date: Sat, 19 Jul 2014 00:50:33 +0300 Subject: [PATCH 1/2] remove deprecated crate definitions --- Makefile | 2 +- argparse/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; From 7f617f3b5180f8822e59f11dcb1e375c764a4c08 Mon Sep 17 00:00:00 2001 From: kagia Date: Sat, 19 Jul 2014 09:31:26 +0300 Subject: [PATCH 2/2] string indexing no longer allowed in rust --- argparse/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); } } }