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/nix/doctor.cc | |
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/nix/doctor.cc')
-rw-r--r-- | third_party/nix/src/nix/doctor.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/third_party/nix/src/nix/doctor.cc b/third_party/nix/src/nix/doctor.cc index 44b4bd605d6c..79e9eb5394e7 100644 --- a/third_party/nix/src/nix/doctor.cc +++ b/third_party/nix/src/nix/doctor.cc @@ -1,3 +1,5 @@ +#include <absl/strings/match.h> + #include "command.hh" #include "serve-protocol.hh" #include "shared.hh" @@ -73,7 +75,7 @@ struct CmdDoctor : StoreCommand { Path userEnv = canonPath(profileDir, true); if (store->isStorePath(userEnv) && - hasSuffix(userEnv, "user-environment")) { + absl::EndsWith(userEnv, "user-environment")) { while (profileDir.find("/profiles/") == std::string::npos && isLink(profileDir)) { profileDir = absPath(readLink(profileDir), dirOf(profileDir)); |