From bf452cbc2ae2b209ec262ce858deca470d086f24 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 25 May 2020 15:54:14 +0100 Subject: refactor(3p/nix): Replace tokenizeStrings with absl::StrSplit This function was a custom (and inefficient in the case of single-character delimiters) string splitter which was used all over the codebase. Abseil provides an appropriate replacement function. --- third_party/nix/src/libstore/local-store.hh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'third_party/nix/src/libstore/local-store.hh') diff --git a/third_party/nix/src/libstore/local-store.hh b/third_party/nix/src/libstore/local-store.hh index c1bfc0876412..178cadf92bf6 100644 --- a/third_party/nix/src/libstore/local-store.hh +++ b/third_party/nix/src/libstore/local-store.hh @@ -5,6 +5,8 @@ #include #include +#include + #include "pathlocks.hh" #include "sqlite.hh" #include "store-api.hh" @@ -94,7 +96,9 @@ class LocalStore : public LocalFSStore { public: // Hack for build-remote.cc. - PathSet locksHeld = tokenizeString(getEnv("NIX_HELD_LOCKS")); + // TODO(tazjin): remove this when we've got gRPC + PathSet locksHeld = + absl::StrSplit(getEnv("NIX_HELD_LOCKS"), absl::ByAnyChar(" \t\n\r")); /* Initialise the local store, upgrading the schema if necessary. */ -- cgit 1.4.1