refactor(tvix): Use absl::btree_map for DerivationInputs

Change-Id: If160ab1b09161969d9080d5d0d6f82e44a953e3c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1684
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2020-08-06 03:26:30 +01:00 committed by tazjin
parent 91bd7ce73a
commit 3ec3661678
2 changed files with 2 additions and 4 deletions

View file

@ -713,7 +713,7 @@ HookInstance::~HookInstance() {
//////////////////////////////////////////////////////////////////////
typedef std::map<std::string, std::string> StringRewrites;
using StringRewrites = std::map<std::string, std::string>;
std::string rewriteStrings(std::string s, const StringRewrites& rewrites) {
for (auto& i : rewrites) {

View file

@ -42,10 +42,8 @@ using DerivationOutputs = absl::btree_map<std::string, DerivationOutput>;
/* For inputs that are sub-derivations, we specify exactly which
output IDs we are interested in. */
// TODO(grfn): change to absl::flat_hash_map
using DerivationInputs = std::map<Path, StringSet>;
using DerivationInputs = absl::btree_map<Path, StringSet>;
// TODO(grfn): change to absl::flat_hash_map
using StringPairs = std::map<std::string, std::string>;
struct BasicDerivation {