Protobuf doesn't directly support heterogeneous lookup with absl::string_view

If the platform does not have `std::string_view` (i.e. `absl::string_view` is not an alias of `std::string_view`) the lookup will cause build failure.

PiperOrigin-RevId: 503159858
Change-Id: Ide8229ae0219d1cb6f3b36aba26da8d53183bc4b
This commit is contained in:
Wiktor Garbacz 2023-01-19 07:31:23 -08:00 committed by Copybara-Service
parent 2f64d3d925
commit 8bf9868ec3

View File

@ -196,7 +196,7 @@ absl::Status Mounts::Remove(absl::string_view path) {
return absl::NotFoundError(
absl::StrCat("File node is mounted at parent of: ", path));
}
auto it = curtree->mutable_entries()->find(part);
auto it = curtree->mutable_entries()->find(std::string(part));
if (it == curtree->mutable_entries()->end()) {
return absl::NotFoundError(
absl::StrCat("Path does not exist in mounts: ", path));