diff --git a/sdk/storage/azure-storage-blobs/src/blob_client.cpp b/sdk/storage/azure-storage-blobs/src/blob_client.cpp index cc257f64e..76f94946c 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_client.cpp @@ -284,8 +284,7 @@ namespace Azure { namespace Storage { namespace Blobs { ret.IsServerEncrypted = response->IsServerEncrypted; ret.EncryptionKeySha256 = std::move(response->EncryptionKeySha256); return Azure::Core::Response( - std::move(ret), - std::make_unique(std::move(response.GetRawResponse()))); + std::move(ret), response.ExtractRawResponse()); }; auto ret = returnTypeConverter(firstChunk); @@ -425,8 +424,7 @@ namespace Azure { namespace Storage { namespace Blobs { ret.IsServerEncrypted = response->IsServerEncrypted; ret.EncryptionKeySha256 = std::move(response->EncryptionKeySha256); return Azure::Core::Response( - std::move(ret), - std::make_unique(std::move(response.GetRawResponse()))); + std::move(ret), response.ExtractRawResponse()); }; auto ret = returnTypeConverter(firstChunk); diff --git a/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp b/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp index 066b422cb..83da2161e 100644 --- a/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp @@ -175,9 +175,7 @@ namespace Azure { namespace Storage { namespace Blobs { ret.EncryptionKeySha256 = std::move(commitBlockListResponse->EncryptionKeySha256); ret.EncryptionScope = std::move(commitBlockListResponse->EncryptionScope); return Azure::Core::Response( - std::move(ret), - std::make_unique( - std::move(commitBlockListResponse.GetRawResponse()))); + std::move(ret), commitBlockListResponse.ExtractRawResponse()); } Azure::Core::Response BlockBlobClient::UploadFrom( @@ -256,9 +254,7 @@ namespace Azure { namespace Storage { namespace Blobs { result.EncryptionKeySha256 = commitBlockListResponse->EncryptionKeySha256; result.EncryptionScope = commitBlockListResponse->EncryptionScope; return Azure::Core::Response( - std::move(result), - std::make_unique( - std::move(commitBlockListResponse.GetRawResponse()))); + std::move(result), commitBlockListResponse.ExtractRawResponse()); } Azure::Core::Response BlockBlobClient::StageBlock( diff --git a/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp b/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp index 599e2a506..36819656d 100644 --- a/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp +++ b/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp @@ -679,9 +679,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { ret.Metadata = std::move(response->Metadata); ret.IsServerEncrypted = response->IsServerEncrypted; return Azure::Core::Response( - std::move(ret), - std::make_unique( - std::move(response.GetRawResponse()))); + std::move(ret), response.ExtractRawResponse()); }; auto ret = returnTypeConverter(firstChunk); @@ -815,9 +813,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { ret.Metadata = std::move(response->Metadata); ret.IsServerEncrypted = response->IsServerEncrypted; return Azure::Core::Response( - std::move(ret), - std::make_unique( - std::move(response.GetRawResponse()))); + std::move(ret), response.ExtractRawResponse()); }; auto ret = returnTypeConverter(firstChunk); @@ -960,8 +956,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Models::UploadShareFileFromResult result; result.IsServerEncrypted = createResult->IsServerEncrypted; return Azure::Core::Response( - std::move(result), - std::make_unique(std::move(createResult.GetRawResponse()))); + std::move(result), createResult.ExtractRawResponse()); } Azure::Core::Response ShareFileClient::UploadFrom( @@ -1061,7 +1056,6 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { Models::UploadShareFileFromResult result; result.IsServerEncrypted = createResult->IsServerEncrypted; return Azure::Core::Response( - std::move(result), - std::make_unique(std::move(createResult.GetRawResponse()))); + std::move(result), createResult.ExtractRawResponse()); } }}}} // namespace Azure::Storage::Files::Shares