mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-23 05:31:32 +00:00
fix(interface-types) Don't duplicate code in the binary encoder.
Use the `ToBytes` implementation of `RecordType` to encode the inner record type of a type, so that it avoids code duplication.
This commit is contained in:
@ -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)?;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user