diff options
| author | bors <bors@rust-lang.org> | 2013-03-12 09:21:56 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-03-12 09:21:56 -0700 |
| commit | 15d78fc398527c5035c092c1c67db600543902d5 (patch) | |
| tree | 8af833ec17dcb22d310b7930d6a0404cd8672bd6 /src/rustllvm/RustWrapper.cpp | |
| parent | 34aaf350c2c38435a3b20d454b17f8fbbd2a1d8a (diff) | |
| parent | 4f4f69d731ae8cf42eb898fee1de418e76879552 (diff) | |
| download | rust-15d78fc398527c5035c092c1c67db600543902d5.tar.gz rust-15d78fc398527c5035c092c1c67db600543902d5.zip | |
auto merge of #5329 : wanderview/rust/std-getopts-opts_present, r=graydon
Currently the opts_present() function only checks to see if the option is
configured in the match, but doesn't actually check to see if the option
value has been set. This means that opt_present('h') may return false while
opts_present([~'h']) returns true.
Add a test case to catch this condition and fix opts_present() to check
the value before returning true.
Note, there is another API difference between these two functions that this
does not address. Currently if you pass a non-configured option to
opt_present() the program will fail!(), but opts_present() simply returns
false. If it is acceptable to standardize on the fail!() then opts_present()
should probably be implemented in terms of the opt_present() function.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
