This is an automated email from the ASF dual-hosted git repository.

suyanhanx pushed a commit to branch gdrive-auth
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/gdrive-auth by this push:
     new 059e3e08a format
059e3e08a is described below

commit 059e3e08aa2c3cd1697aa9abb5e86f4a3486ece2
Author: suyanhanx <[email protected]>
AuthorDate: Wed Aug 23 22:37:26 2023 +0800

    format
    
    Signed-off-by: suyanhanx <[email protected]>
---
 core/src/services/dropbox/core.rs   | 10 ++++++----
 core/src/services/gdrive/builder.rs |  3 ++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/core/src/services/dropbox/core.rs 
b/core/src/services/dropbox/core.rs
index a334c919e..4b3fba758 100644
--- a/core/src/services/dropbox/core.rs
+++ b/core/src/services/dropbox/core.rs
@@ -42,9 +42,11 @@ use crate::types::ErrorKind;
 use crate::types::Result;
 
 pub struct DropboxCore {
-    pub signer: Arc<Mutex<DropboxSigner>>,
-    pub client: HttpClient,
     pub root: String,
+
+    pub client: HttpClient,
+
+    pub signer: Arc<Mutex<DropboxSigner>>,
 }
 
 impl Debug for DropboxCore {
@@ -360,11 +362,11 @@ pub struct DropboxSigner {
 impl Default for DropboxSigner {
     fn default() -> Self {
         DropboxSigner {
-            refresh_token: "".to_string(),
+            refresh_token: String::new(),
             client_id: String::new(),
             client_secret: String::new(),
 
-            access_token: "".to_string(),
+            access_token: String::new(),
             expires_in: DateTime::<Utc>::MIN_UTC,
         }
     }
diff --git a/core/src/services/gdrive/builder.rs 
b/core/src/services/gdrive/builder.rs
index eddeb95d6..41cc90cee 100644
--- a/core/src/services/gdrive/builder.rs
+++ b/core/src/services/gdrive/builder.rs
@@ -28,7 +28,8 @@ use tokio::sync::Mutex;
 use super::backend::GdriveBackend;
 use crate::raw::normalize_root;
 use crate::raw::HttpClient;
-use crate::services::gdrive::core::{GdriveCore, GdriveSigner};
+use crate::services::gdrive::core::GdriveCore;
+use crate::services::gdrive::core::GdriveSigner;
 use crate::Scheme;
 use crate::*;
 

Reply via email to