mirror of
https://github.com/fluencelabs/interface-types
synced 2024-12-04 15:20:20 +00:00
Merge #1363
1363: fix(interface-types) Don't duplicate code in the binary encoder. r=MarkMcCaskey a=Hywan Use the `ToBytes` implementation of `RecordType` to encode the inner record type of a type, so that it avoids code duplication. Co-authored-by: Ivan Enderlin <ivan@mnt.io>
This commit is contained in:
commit
7f43c2ec49
@ -170,9 +170,9 @@ where
|
||||
outputs.to_bytes(writer)?;
|
||||
}
|
||||
|
||||
Type::Record(RecordType { fields }) => {
|
||||
Type::Record(record_type) => {
|
||||
TypeKind::Record.to_bytes(writer)?;
|
||||
fields.to_bytes(writer)?;
|
||||
record_type.to_bytes(writer)?;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user