From 461312b57d3b49f92861d2c6c5e8a6b13ffa839b Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Tue, 25 Feb 2025 13:42:22 +0100 Subject: ArtifactBlob: Use static function for construction --- src/buildtool/execution_api/remote/bazel/bazel_response.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/buildtool/execution_api/remote/bazel/bazel_response.cpp') diff --git a/src/buildtool/execution_api/remote/bazel/bazel_response.cpp b/src/buildtool/execution_api/remote/bazel/bazel_response.cpp index f06a4275..d0429cd7 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_response.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_response.cpp @@ -50,12 +50,8 @@ auto ProcessDirectoryMessage(HashFunction hash_function, fmt::format("found invalid symlink at {}", link.name())}; } } - auto data = dir.SerializeAsString(); - auto digest = ArtifactDigestFactory::HashDataAs( - hash_function, data); - return ArtifactBlob{std::move(digest), - std::move(data), - /*is_exec=*/false}; + return ArtifactBlob::FromMemory( + hash_function, ObjectType::File, dir.SerializeAsString()); } } // namespace -- cgit v1.2.3