]> git.proxmox.com Git - cargo.git/commitdiff
auto merge of #682 : vhbit/cargo/empty-features, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 9 Oct 2014 19:44:57 +0000 (19:44 +0000)
committerbors <bors@rust-lang.org>
Thu, 9 Oct 2014 19:44:57 +0000 (19:44 +0000)
For automation it should be no difference between invocations
of `--features "feat1 feat2 feat3"` and `--features ""`.

The problem is that in the latter case `docopt` sets flag_feature to vec![""]

Could be solved on 3 different levels:

- patching `docopt` to treat empty string for a Vec<String> flag
  as empty vec. Although I can't imagine that in some place it
  might be required to treat empty string as vector of empty
  strings it is might have its own use

- filtering flags_feature right after parsing command line and
  before passing further. It means it should be fixed in at
  least 4 different places now and may be forgotten in future

- filtering empty string feature while resolving - perhaps
  the easiest and more universal solution, implemented in this
  patch


Trivial merge