From be990be4eda31770ebd940e9a8c79a2927b4fd15 Mon Sep 17 00:00:00 2001 From: Abdulla Abdurakhmanov Date: Wed, 3 Jul 2024 17:39:33 +0200 Subject: [PATCH] Remove unnecessary requirement for Sync for storage_objects_insert_ext_stream extension function (#147) --- .../openapi/google/storage-v1/ext/apis/objects_api.rs | 5 +++-- .../google_rest_apis/storage_v1/apis/objects_api.rs | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gcloud-protos-generator/openapi/google/storage-v1/ext/apis/objects_api.rs b/gcloud-protos-generator/openapi/google/storage-v1/ext/apis/objects_api.rs index c5e36944e..e39590918 100644 --- a/gcloud-protos-generator/openapi/google/storage-v1/ext/apis/objects_api.rs +++ b/gcloud-protos-generator/openapi/google/storage-v1/ext/apis/objects_api.rs @@ -1,4 +1,5 @@ pub type BoxStreamWithSync<'a, T> = std::pin::Pin + Send + 'a + Sync>>; +pub type BoxStreamWithSend<'a, T> = std::pin::Pin + Send + 'a>>; /// Stores a new object and metadata. /// Open API doesn't support binary streams and this particular endpoint uses another base URL. @@ -7,7 +8,7 @@ pub async fn storage_objects_insert_ext_stream( configuration: &configuration::Configuration, params: StoragePeriodObjectsPeriodInsertParams, content_type: Option, - bytes_stream: BoxStreamWithSync< + bytes_stream: BoxStreamWithSend< 'static, std::result::Result>, > @@ -166,7 +167,7 @@ pub async fn storage_objects_insert_ext_bytes( > { use futures::StreamExt; - let bytes_stream: BoxStreamWithSync< + let bytes_stream: BoxStreamWithSend< 'static, std::result::Result>, > = Box::pin( diff --git a/gcloud-sdk/src/rest_apis/google_rest_apis/storage_v1/apis/objects_api.rs b/gcloud-sdk/src/rest_apis/google_rest_apis/storage_v1/apis/objects_api.rs index 95d43c8a4..8a9667b16 100644 --- a/gcloud-sdk/src/rest_apis/google_rest_apis/storage_v1/apis/objects_api.rs +++ b/gcloud-sdk/src/rest_apis/google_rest_apis/storage_v1/apis/objects_api.rs @@ -2381,6 +2381,7 @@ pub async fn storage_objects_watch_all( pub type BoxStreamWithSync<'a, T> = std::pin::Pin + Send + 'a + Sync>>; +pub type BoxStreamWithSend<'a, T> = std::pin::Pin + Send + 'a>>; /// Stores a new object and metadata. /// Open API doesn't support binary streams and this particular endpoint uses another base URL. @@ -2389,7 +2390,7 @@ pub async fn storage_objects_insert_ext_stream( configuration: &configuration::Configuration, params: StoragePeriodObjectsPeriodInsertParams, content_type: Option, - bytes_stream: BoxStreamWithSync< + bytes_stream: BoxStreamWithSend< 'static, std::result::Result>, >, @@ -2546,7 +2547,7 @@ pub async fn storage_objects_insert_ext_bytes( > { use futures::StreamExt; - let bytes_stream: BoxStreamWithSync< + let bytes_stream: BoxStreamWithSend< 'static, std::result::Result>, > = Box::pin(