From: bors Date: Tue, 31 Oct 2017 16:49:55 +0000 (+0000) Subject: Auto merge of #4683 - djc:requirements, r=alexcrichton X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~5^2~16 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d2d7b3008220d37d6960368954c274d826ca9437;p=cargo.git Auto merge of #4683 - djc:requirements, r=alexcrichton Introduce Requirements struct to clarify code `cargo::core::resolver::build_requirements()` previously, in this order: * Defined local variables to track state * Called a function to mutate the local variables * Defined the aforementioned function * Returned two out of three local variables as a tuple This PR changes the code so that this is a recast as a struct (appropriately called `Requirements`), which is mutated in a more fine-grained way by its methods and acts as the return type for `build_requirements()`. To me, this seems a lot easier to understand. This work was done in the context of #1286, but I figured it was easier to start landing some of the refactoring to avoid bitrot and get early (well, earlier) feedback. --- d2d7b3008220d37d6960368954c274d826ca9437