diff --git a/crates/cloud_objects/src/cloud_object/update.rs b/crates/cloud_objects/src/cloud_object/update.rs index 8a4bea4653..d7238e7d63 100644 --- a/crates/cloud_objects/src/cloud_object/update.rs +++ b/crates/cloud_objects/src/cloud_object/update.rs @@ -15,43 +15,10 @@ pub enum UpdateCloudObjectResult { } /// Helper struct that contains all the info needed to fetch changed objects from the server. -#[derive(Default)] +#[derive(Default, Clone)] pub struct ObjectsToUpdate { pub notebooks: Vec, pub workflows: Vec, pub folders: Vec, pub generic_string_objects: Vec, } - -impl Clone for ObjectsToUpdate { - fn clone(&self) -> Self { - Self { - notebooks: self - .notebooks - .iter() - .map(copy_updated_object_input) - .collect(), - workflows: self - .workflows - .iter() - .map(copy_updated_object_input) - .collect(), - folders: self.folders.iter().map(copy_updated_object_input).collect(), - generic_string_objects: self - .generic_string_objects - .iter() - .map(copy_updated_object_input) - .collect(), - } - } -} - -fn copy_updated_object_input(input: &UpdatedObjectInput) -> UpdatedObjectInput { - UpdatedObjectInput { - uid: input.uid.clone(), - actions_ts: input.actions_ts, - metadata_ts: input.metadata_ts, - permissions_ts: input.permissions_ts, - revision_ts: input.revision_ts, - } -} diff --git a/crates/graphql/src/api/queries/get_updated_cloud_objects.rs b/crates/graphql/src/api/queries/get_updated_cloud_objects.rs index 8c4753f548..b07974b5ee 100644 --- a/crates/graphql/src/api/queries/get_updated_cloud_objects.rs +++ b/crates/graphql/src/api/queries/get_updated_cloud_objects.rs @@ -69,7 +69,7 @@ pub struct UpdatedCloudObjectsInput { pub workflows: Option>, } -#[derive(cynic::InputObject, Debug)] +#[derive(cynic::InputObject, Debug, Clone)] pub struct UpdatedObjectInput { pub actions_ts: Option