From 3a771602f8ee6c7940208d447463061aa9b6af8c Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 29 Aug 2024 11:55:07 +0200 Subject: Return the IsTree flag from ArtifactDigest ...and replace obvious redundant conversions to bazel_re::Digest, which were done to ensure that the digest represents a tree. --- src/buildtool/execution_api/common/blob_tree.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/buildtool/execution_api/common/blob_tree.hpp') diff --git a/src/buildtool/execution_api/common/blob_tree.hpp b/src/buildtool/execution_api/common/blob_tree.hpp index 25d0f560..051b0fe2 100644 --- a/src/buildtool/execution_api/common/blob_tree.hpp +++ b/src/buildtool/execution_api/common/blob_tree.hpp @@ -22,7 +22,6 @@ #include #include "gsl/gsl" -#include "src/buildtool/compatibility/native_support.hpp" #include "src/buildtool/execution_api/bazel_msg/directory_tree.hpp" #include "src/buildtool/execution_api/common/artifact_blob_container.hpp" @@ -38,8 +37,7 @@ class BlobTree { [[nodiscard]] auto Blob() const noexcept -> ArtifactBlob { return blob_; } [[nodiscard]] auto IsTree() const noexcept -> bool { - return NativeSupport::IsTree( - static_cast(blob_.digest).hash()); + return blob_.digest.IsTree(); } /// \brief Create a `BlobTree` from a `DirectoryTree`. -- cgit v1.2.3