From 7379cffab50c9e1d9d4ced3258072ebf3f47ef09 Mon Sep 17 00:00:00 2001 From: suyanhanx Date: Wed, 19 Jun 2024 14:37:55 +0800 Subject: [PATCH] try Signed-off-by: suyanhanx --- core/src/services/aliyun_drive/backend.rs | 28 +++++++++++------------ core/src/services/aliyun_drive/core.rs | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/core/src/services/aliyun_drive/backend.rs b/core/src/services/aliyun_drive/backend.rs index 2383e5ebfa51..a1497462ef87 100644 --- a/core/src/services/aliyun_drive/backend.rs +++ b/core/src/services/aliyun_drive/backend.rs @@ -43,31 +43,31 @@ use crate::*; #[serde(default)] #[non_exhaustive] pub struct AliyunDriveConfig { - /// root of this backend. + /// The Root of this backend. /// /// All operations will happen under this root. /// - /// default to `/` if not set. + /// Default to `/` if not set. pub root: Option, - /// access_token of this backend. + /// The access_token of this backend. /// /// Solution for client-only purpose. #4733 /// - /// required if no client_id, client_secret and refresh_token are provided. + /// Required if no client_id, client_secret and refresh_token are provided. pub access_token: Option, - /// client_id of this backend. + /// The client_id of this backend. /// - /// required if no access_token is provided. + /// Required if no access_token is provided. pub client_id: Option, - /// client_secret of this backend. + /// The client_secret of this backend. /// - /// required if no access_token is provided. + /// Required if no access_token is provided. pub client_secret: Option, - /// refresh_token of this backend. + /// The refresh_token of this backend. /// - /// required if no access_token is provided. + /// Required if no access_token is provided. pub refresh_token: Option, - /// drive_type of this backend. + /// The drive_type of this backend. /// /// All operations will happen under this type of drive. /// @@ -106,7 +106,7 @@ impl Debug for AliyunDriveBuilder { } impl AliyunDriveBuilder { - /// Set root of this backend. + /// Set the root of this backend. /// /// All operations will happen under this root. pub fn root(&mut self, root: &str) -> &mut Self { @@ -342,8 +342,8 @@ impl Access for AliyunDriveBackend { let parent_path = get_parent(to); let parent_file_id = self.core.ensure_dir_exists(parent_path).await?; - // if from and to are going to be placed in the same folder - // copy_path will fail as we cannot change name during this action. + // if from and to are going to be placed in the same folder, + // copy_path will fail as we cannot change the name during this action. // it has to be auto renamed. let auto_rename = file.parent_file_id == parent_file_id; let res = self diff --git a/core/src/services/aliyun_drive/core.rs b/core/src/services/aliyun_drive/core.rs index 8e057683b154..1ec229e6863d 100644 --- a/core/src/services/aliyun_drive/core.rs +++ b/core/src/services/aliyun_drive/core.rs @@ -40,11 +40,11 @@ pub enum DriveType { Default, /// Use the backup type of Aliyun Drive. /// - /// fallback to the default type if no backup drive found. + /// Fallback to the default type if no backup drive is found. Backup, /// Use the resource type of Aliyun Drive. /// - /// fallback to the default type if no resource drive found. + /// Fallback to the default type if no resource drive is found. Resource, }