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/gc.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'third_party/nix/src/libstore/gc.cc') diff --git a/third_party/nix/src/libstore/gc.cc b/third_party/nix/src/libstore/gc.cc index 1b2364c25383..262f17df0338 100644 --- a/third_party/nix/src/libstore/gc.cc +++ b/third_party/nix/src/libstore/gc.cc @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -512,7 +513,7 @@ struct LocalStore::GCState { bool LocalStore::isActiveTempFile(const GCState& state, const Path& path, const std::string& suffix) { - return hasSuffix(path, suffix) && + return absl::EndsWith(path, suffix) && state.tempRoots.find(std::string( path, 0, path.size() - suffix.size())) != state.tempRoots.end(); } -- cgit 1.4.1