about summary refs log tree commit diff
path: root/third_party/nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-08-06T02·26+0100
committertazjin <mail@tazj.in>2020-08-06T02·30+0000
commit3ec366167823c0821d94b4b79fb6265c58e8bffb (patch)
treeb9989962bed8d9fb9d595b34d753bdb4a75069d5 /third_party/nix
parent91bd7ce73ab7eacaf995090014f67391624531c1 (diff)
refactor(tvix): Use absl::btree_map for DerivationInputs r/1611
Change-Id: If160ab1b09161969d9080d5d0d6f82e44a953e3c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1684
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
Diffstat (limited to 'third_party/nix')
-rw-r--r--third_party/nix/src/libstore/build.cc2
-rw-r--r--third_party/nix/src/libstore/derivations.hh4
2 files changed, 2 insertions, 4 deletions
diff --git a/third_party/nix/src/libstore/build.cc b/third_party/nix/src/libstore/build.cc
index afd2374b0ac1..27d6aa611f6f 100644
--- a/third_party/nix/src/libstore/build.cc
+++ b/third_party/nix/src/libstore/build.cc
@@ -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) {
diff --git a/third_party/nix/src/libstore/derivations.hh b/third_party/nix/src/libstore/derivations.hh
index 63527149d8a0..dfdebdd01ec8 100644
--- a/third_party/nix/src/libstore/derivations.hh
+++ b/third_party/nix/src/libstore/derivations.hh
@@ -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 {