ariesdevil commented on code in PR #3092:
URL: https://github.com/apache/fory/pull/3092#discussion_r2647136373


##########
rust/fory-derive/src/object/write.rs:
##########
@@ -305,13 +306,13 @@ fn gen_write_field_impl(
     }
 }
 
-pub fn gen_write_data(fields: &[&Field]) -> TokenStream {
-    let write_fields_ts: Vec<_> = get_filtered_fields_iter(fields)
-        .enumerate()
-        .map(|(idx, field)| gen_write_field_with_index(field, idx, true))
+pub fn gen_write_data(sorted_fields: &[SortedField<'_>]) -> TokenStream {
+    let fields: Vec<&Field> = sorted_fields.iter().map(|sf| 
sf.field).collect();
+    let write_fields_ts: Vec<_> = 
get_filtered_sorted_fields_iter(sorted_fields)

Review Comment:
   Yup ,as I said above, what I want to express is fields with original index



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to