summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/remote/target_client.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-06-20 16:30:38 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-06-25 13:59:48 +0200
commitf1b92cf45f0ea07f22965ab6d9bca5fcd97e03a8 (patch)
tree8e198e81ee501b324f7fd4292a5f8835363bdea1 /src/buildtool/serve_api/remote/target_client.cpp
parent5b3ee91c84d37fe2cd7d4ddd9d26370447564161 (diff)
downloadjustbuild-f1b92cf45f0ea07f22965ab6d9bca5fcd97e03a8.tar.gz
Pass IExecutionApi to IExecutionApi by reference
...instead of not_null const ptr.
Diffstat (limited to 'src/buildtool/serve_api/remote/target_client.cpp')
-rw-r--r--src/buildtool/serve_api/remote/target_client.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buildtool/serve_api/remote/target_client.cpp b/src/buildtool/serve_api/remote/target_client.cpp
index c8a7fc94..7b13b90e 100644
--- a/src/buildtool/serve_api/remote/target_client.cpp
+++ b/src/buildtool/serve_api/remote/target_client.cpp
@@ -38,7 +38,7 @@ auto TargetClient::ServeTarget(const TargetCacheKey& key,
const std::string& repo_key) const noexcept
-> std::optional<serve_target_result_t> {
// make sure the blob containing the key is in the remote cas
- if (!apis_.local->RetrieveToCas({key.Id()}, &*apis_.remote)) {
+ if (!apis_.local->RetrieveToCas({key.Id()}, *apis_.remote)) {
return serve_target_result_t{
std::in_place_index<1>,
fmt::format("Failed to retrieve to remote cas ObjectInfo {}",
@@ -48,7 +48,7 @@ auto TargetClient::ServeTarget(const TargetCacheKey& key,
if (!apis_.local->RetrieveToCas(
{Artifact::ObjectInfo{.digest = ArtifactDigest{repo_key, 0, false},
.type = ObjectType::File}},
- &*apis_.remote)) {
+ *apis_.remote)) {
return serve_target_result_t{
std::in_place_index<1>,
fmt::format("Failed to retrieve to remote cas blob {}", repo_key)};
@@ -94,7 +94,7 @@ auto TargetClient::ServeTarget(const TargetCacheKey& key,
}
auto const& dispatch_info = Artifact::ObjectInfo{
.digest = ArtifactDigest{*dispatch_dgst}, .type = ObjectType::File};
- if (!apis_.local->RetrieveToCas({dispatch_info}, &*apis_.remote)) {
+ if (!apis_.local->RetrieveToCas({dispatch_info}, *apis_.remote)) {
return serve_target_result_t{
std::in_place_index<1>,
fmt::format("Failed to upload blob {} to remote cas",
@@ -127,7 +127,7 @@ auto TargetClient::ServeTarget(const TargetCacheKey& key,
auto const& obj_info = Artifact::ObjectInfo{
.digest = target_value_dgst, .type = ObjectType::File};
if (!apis_.local->IsAvailable(target_value_dgst)) {
- if (!apis_.remote->RetrieveToCas({obj_info}, &*apis_.local)) {
+ if (!apis_.remote->RetrieveToCas({obj_info}, *apis_.local)) {
return serve_target_result_t{
std::in_place_index<1>,
fmt::format(