tailhook / rust-argparse

The command-line argument parser library for rust
MIT License
240 stars 39 forks source link

Rust0.11 #1

Closed kagiasoldaccount closed 10 years ago

kagiasoldaccount commented 10 years ago

These PR provides fixes allowing the library to compile and pass tests on rust 0.11 nightly (windows).

  1. because it is expected that cargo will now handle versioning of crates the crate_id attribute has been deprecated. In the future we need to consider adding cargo support.
  2. String indexing was removed from rust #12710 because string indexing was really byte indexing not character indexing. Also UTF-8 strings don't lend themselves to random access, you have to either iterate over them or build some an index mapping each graphene to an index. For now I assume this lib is only aiming for ASCII compatibility in which case byte indexing is okay. But we may want to think of Unicode support for eastern and middle-eastern users in the future.

all test pass on my machine

tailhook commented 10 years ago

Thanks! For the character indexing issue, it's just second character. It's easy to iterate for the second one (In fact in the ArgumentKind it's done so, so it seems just single place I'm missing). May be I'll find some time to build nightly and make real fix.