File tree Expand file tree Collapse file tree
google/cloud/storage/internal/async Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,8 +134,8 @@ std::shared_ptr<storage::internal::HashFunction> CreateAppendableHashFunction(
134134 return std::make_shared<storage::internal::CompositeFunction>(
135135 std::move (crc32c), std::move (md5));
136136 }
137- if (crc32c) return std::move ( crc32c) ;
138- if (md5) return std::move ( md5) ;
137+ if (crc32c) return crc32c;
138+ if (md5) return md5;
139139 return storage::internal::CreateNullHashFunction ();
140140}
141141
Original file line number Diff line number Diff line change 1616#include " google/cloud/storage/internal/async/handle_redirect_error.h"
1717#include " google/cloud/storage/internal/async/partial_upload.h"
1818#include " google/cloud/storage/internal/async/write_payload_impl.h"
19+ #include " google/cloud/storage/internal/base64.h"
1920#include " google/cloud/storage/internal/grpc/ctype_cord_workaround.h"
2021#include " google/cloud/storage/internal/grpc/object_metadata_parser.h"
2122#include " google/cloud/storage/internal/hash_function_impl.h"
23+ #include " google/cloud/internal/big_endian.h"
2224#include " google/cloud/internal/make_status.h"
2325
2426namespace google {
@@ -27,6 +29,12 @@ namespace storage_internal {
2729GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2830namespace {
2931
32+ std::string FormatCrc32c (absl::optional<std::uint32_t > crc) {
33+ if (!crc) return {};
34+ return storage::internal::Base64Encode (
35+ google::cloud::internal::EncodeBigEndian (*crc));
36+ }
37+
3038auto HandleFinishAfterError (std::string msg) {
3139 return [m = std::move (msg)](future<Status> f) {
3240 auto status = f.get ();
You can’t perform that action at this time.
0 commit comments