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


##########
bindings/python/src/operator.rs:
##########
@@ -184,15 +200,21 @@ impl Operator {
     }
 
     pub fn capability(&self) -> PyResult<capability::Capability> {
-        Ok(capability::Capability::new(self.0.info().full_capability()))
+        Ok(capability::Capability::new(
+            self.core.info().full_capability(),
+        ))
     }
 
     pub fn to_async_operator(&self) -> PyResult<AsyncOperator> {
-        Ok(AsyncOperator(self.0.clone().into()))
+        Ok(AsyncOperator {
+            core: self.core.clone().into(),
+            __scheme: self.__scheme.clone(),
+            __map: self.__map.clone(),
+        })
     }
 
     fn __repr__(&self) -> String {

Review Comment:
   > I prefer don’t implement **hash** and **eq** for Operator, and remove the 
equal assertion based on **repr**.
   
   Agreed. `ocore::Operator` doesn't implement `Eq` ahd `Hash` too.



-- 
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