From b99b368d17f2e806a61f7abb83c6d3a9e4bbdc38 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 25 May 2020 02:19:01 +0100 Subject: refactor(3p/nix/libutil): Replace hasPrefix/Suffix with Abseil Uses the equivalent absl::StartsWith and absl::EndsWith functions instead. --- third_party/nix/src/libstore/local-binary-cache-store.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'third_party/nix/src/libstore/local-binary-cache-store.cc') diff --git a/third_party/nix/src/libstore/local-binary-cache-store.cc b/third_party/nix/src/libstore/local-binary-cache-store.cc index 00bb21eb24fe..88dd19a32069 100644 --- a/third_party/nix/src/libstore/local-binary-cache-store.cc +++ b/third_party/nix/src/libstore/local-binary-cache-store.cc @@ -1,5 +1,7 @@ #include +#include + #include "binary-cache-store.hh" #include "globals.hh" #include "nar-info-disk-cache.hh" @@ -39,7 +41,7 @@ class LocalBinaryCacheStore : public BinaryCacheStore { PathSet paths; for (auto& entry : readDirectory(binaryCacheDir)) { - if (entry.name.size() != 40 || !hasSuffix(entry.name, ".narinfo")) { + if (entry.name.size() != 40 || !absl::EndsWith(entry.name, ".narinfo")) { continue; } paths.insert(storeDir + "/" + -- cgit 1.4.1