Xuanwo commented on code in PR #4029:
URL: https://github.com/apache/opendal/pull/4029#discussion_r1459035255


##########
core/src/services/icloud/core.rs:
##########
@@ -224,6 +240,19 @@ impl IcloudSigner {
             );
         }
 
+        if !self.data.cookies.is_empty() {
+            let cookies: Vec<String> = self

Review Comment:
   We don't need this because reqwest automatically loads and sets `cookies`.



##########
core/src/services/icloud/core.rs:
##########
@@ -110,9 +113,18 @@ impl Debug for IcloudSigner {
 }
 
 impl IcloudSigner {
-    /// Get the session data from signer.
-    pub fn session_data(&self) -> &SessionData {
-        &self.data
+    /// Get the drivews_url from signer session data.
+    /// Async await init finish.
+    pub async fn drivews_url(&mut self) -> Result<String> {
+        self.init().await?;

Review Comment:
   Please check `self.initiated` first. Or we can move the check into `init()` 
directly.



##########
core/src/services/icloud/core.rs:
##########
@@ -489,9 +527,12 @@ impl PathQuery for IcloudPathQuery {
 
     async fn create_dir(&self, parent_id: &str, name: &str) -> Result<String> {
         let mut signer = self.signer.lock().await;
-        let client_id = signer.client_id();
+        let clone = signer.clone();

Review Comment:
   Why we need this? Maybe we can change `client_id()`'s API to `&mut self` 
instead.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to