Allen George created THRIFT-4099:
------------------------------------

             Summary: Auto-derive Hash for generated Rust structs
                 Key: THRIFT-4099
                 URL: https://issues.apache.org/jira/browse/THRIFT-4099
             Project: Thrift
          Issue Type: Improvement
          Components: Rust - Compiler
            Reporter: Allen George
            Priority: Minor


Currently Thrift structs are turned into Rust {{struct}} definitions that do 
not have an auto-derived {{Hash}}. We should auto-derive this trait.

The following behaviors should be checked:

# Can still derive {{Hash}} even if the struct contains a {{double}}
# Can still derive {{Hash}} even if the struct contains {{set<double>}}
# Can still derive {{Hash}} even if the struct contains {{map<double, double>}}

Basically, doubles are represented in the auto-generated code by 
{{OrderedFloat}} instead of {{f64}} since we cannot derive a hash for, or order 
Rust floats. The resulting code should work even if doubles are contained any 
where in the structure.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to