You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@teaclave.apache.org by GitBox <gi...@apache.org> on 2021/08/10 19:58:43 UTC

[GitHub] [incubator-teaclave] ya0guang commented on a change in pull request #542: Use struture builder to construct complicated structures

ya0guang commented on a change in pull request #542:
URL: https://github.com/apache/incubator-teaclave/pull/542#discussion_r686280197



##########
File path: services/management/enclave/src/service.rs
##########
@@ -255,9 +255,10 @@ impl TeaclaveManagement for TeaclaveManagementService {
     ) -> TeaclaveServiceResponseResult<RegisterFunctionResponse> {
         let user_id = self.get_request_user_id(request.metadata())?;
 
-        let function = Function::from(request.message)
-            .id(Uuid::new_v4())
-            .owner(user_id);
+        let mut function = Function::from(request.message);
+        // TODO: use setter functions
+        function.id = Uuid::new_v4();
+        function.owner = user_id;

Review comment:
       Could it use `FunctionBuilder` here?




-- 
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: notifications-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org