Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Panic on duplicates in the options section #228

Open
xTibor opened this issue Aug 16, 2017 · 0 comments
Open

Panic on duplicates in the options section #228

xTibor opened this issue Aug 16, 2017 · 0 comments

Comments

@xTibor
Copy link

xTibor commented Aug 16, 2017

I encountered this panic with 0.8.1 from crates.io and rustc 1.21.0-nightly.

Here's a minimal test case of the problem:

Test program

extern crate docopt;

use docopt::Docopt;

const USAGE: &'static str = "Test
Usage:
  test

Options:
  -h --help
  -h
";

fn main() {
    let x = Docopt::new(USAGE);
}

Panic

`thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /checkout/src/libcore/option.rs:335:20`

Backtrace: https://gist.github.com/xTibor/b596b3f69d1c28d71c74221ea5a98c6b

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant