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


##########
rust/fory-derive/src/util.rs:
##########
@@ -17,38 +17,73 @@
 
 use syn::{Field, Fields, GenericArgument, PathArguments, Type, TypePath, 
TypeTraitObject};
 
-pub fn sorted_fields(fields: &Fields) -> Vec<&Field> {
-    let fields = fields.iter().collect::<Vec<&Field>>();
+/// Sorted field with its original index preserved.
+///
+/// For tuple structs, `original_index` is the field's position in the original
+/// struct definition (0, 1, 2, ...), which is used as the field name.
+#[derive(Clone, Copy)]
+pub struct SortedField<'a> {

Review Comment:
   > What I want to express is fields with original index, how about 
`IndexedField`?
   
   How about `IndexedField`?



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