diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-25T01·19+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-25T01·19+0100 |
commit | b99b368d17f2e806a61f7abb83c6d3a9e4bbdc38 (patch) | |
tree | 1f76047dd027421dcf79cdf4804fa5ff1bb08b2b /third_party/nix/src/build-remote | |
parent | 8cf1322a6fd5ae282d8a09fdba634f27a1a88560 (diff) |
refactor(3p/nix/libutil): Replace hasPrefix/Suffix with Abseil r/845
Uses the equivalent absl::StartsWith and absl::EndsWith functions instead.
Diffstat (limited to 'third_party/nix/src/build-remote')
-rw-r--r-- | third_party/nix/src/build-remote/build-remote.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/nix/src/build-remote/build-remote.cc b/third_party/nix/src/build-remote/build-remote.cc index 351c660db1e9..6bca30a5a136 100644 --- a/third_party/nix/src/build-remote/build-remote.cc +++ b/third_party/nix/src/build-remote/build-remote.cc @@ -7,6 +7,7 @@ #include <tuple> #include <absl/strings/ascii.h> +#include <absl/strings/match.h> #include <absl/strings/str_cat.h> #include <glog/logging.h> @@ -188,7 +189,7 @@ static int _main(int argc, char* argv[]) { DLOG(INFO) << "connecting to '" << bestMachine->storeUri << "'"; Store::Params storeParams; - if (hasPrefix(bestMachine->storeUri, "ssh://")) { + if (absl::StartsWith(bestMachine->storeUri, "ssh://")) { storeParams["max-connections"] = "1"; storeParams["log-fd"] = "4"; if (!bestMachine->sshKey.empty()) { |