{"action":"opened","issue":{"url":"https://api.github.com/repos/docopt/docopt.rs/issues/186","repository_url":"https://api.github.com/repos/docopt/docopt.rs","labels_url":"https://api.github.com/repos/docopt/docopt.rs/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/docopt/docopt.rs/issues/186/comments","events_url":"https://api.github.com/repos/docopt/docopt.rs/issues/186/events","html_url":"https://github.com/docopt/docopt.rs/issues/186","id":156079376,"number":186,"title":"arg_foo field not being populated","user":{"login":"adambadawy","id":6981186,"avatar_url":"https://avatars.githubusercontent.com/u/6981186?v=3","gravatar_id":"","url":"https://api.github.com/users/adambadawy","html_url":"https://github.com/adambadawy","followers_url":"https://api.github.com/users/adambadawy/followers","following_url":"https://api.github.com/users/adambadawy/following{/other_user}","gists_url":"https://api.github.com/users/adambadawy/gists{/gist_id}","starred_url":"https://api.github.com/users/adambadawy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adambadawy/subscriptions","organizations_url":"https://api.github.com/users/adambadawy/orgs","repos_url":"https://api.github.com/users/adambadawy/repos","events_url":"https://api.github.com/users/adambadawy/events{/privacy}","received_events_url":"https://api.github.com/users/adambadawy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-21T02:34:25Z","updated_at":"2016-05-21T02:34:25Z","closed_at":null,"body":"I expect this program:\r\n\r\n```rust\r\nextern crate rustc_serialize;\r\nextern crate docopt;\r\n\r\nuse docopt::Docopt;\r\n\r\nconst USAGE: &'static str = \"\r\nDocopt test.\r\n\r\nUsage:\r\n    dtest (-n <name> | --name=<name>)\r\n\r\nOptions:\r\n    -n --name=<name>  The name\r\n\";\r\n\r\n#[derive(Debug, RustcDecodable)]\r\nstruct Args {\r\n    flag_n: bool,\r\n    flag_name: bool,\r\n    arg_name: Option<String>,\r\n}\r\n\r\nfn main() {\r\n    let args: Args = Docopt::new(USAGE).and_then(|d| d.decode()).unwrap();\r\n    println!(\"{:?}\", args);\r\n}\r\n```\r\n\r\nRun in one of these ways:\r\n\r\n```\r\ndtest -n foo\r\ndtest --name=foo\r\n```\r\n\r\nTo output this:\r\n\r\n```\r\nArgs { flag_n: true, flag_name: true, arg_name: Some(\"foo\") }\r\n```\r\n\r\nBut both ways output this:\r\n\r\n```\r\nArgs { flag_n: true, flag_name: true, arg_name: None }\r\n```\r\n\r\n## Meta\r\n\r\n```\r\nrustc 1.8.0 (db2939409 2016-04-11)\r\nbinary: rustc\r\ncommit-hash: db2939409db26ab4904372c82492cd3488e4c44e\r\ncommit-date: 2016-04-11\r\nhost: x86_64-apple-darwin\r\nrelease: 1.8.0\r\n```"}}
{"actor":{"display_login":"adambadawy"}}