summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/execution_api/remote/bazel/bytestream_client.hpp')
-rw-r--r--src/buildtool/execution_api/remote/bazel/bytestream_client.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp b/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp
index b8823236..1bd44c42 100644
--- a/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp
+++ b/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp
@@ -1,6 +1,7 @@
#ifndef INCLUDED_SRC_BUILDTOOL_EXECUTION_API_REMOTE_BAZEL_BYTESTREAM_CLIENT_HPP
#define INCLUDED_SRC_BUILDTOOL_EXECUTION_API_REMOTE_BAZEL_BYTESTREAM_CLIENT_HPP
+#include <algorithm>
#include <functional>
#include <iomanip>
#include <optional>
@@ -156,12 +157,11 @@ class ByteStreamClient {
std::function<std::string(T_Input const&)> const& to_resource_name,
std::function<std::string(T_Input const&)> const& to_data)
const noexcept -> bool {
- for (auto const& i : inputs) {
- if (not Write(to_resource_name(i), to_data(i))) {
- return false;
- }
- }
- return true;
+ return std::all_of(inputs.begin(),
+ inputs.end(),
+ [this, &to_resource_name, &to_data](auto const& i) {
+ return Write(to_resource_name(i), to_data(i));
+ });
}
private: