Skip to content

SerializedBytes derive macro not working with generics #60

Description

@matthme

The following struct

use hdk::prelude::*;

#[derive(Serialize, Deserialize, Debug, SerializedBytes)]
struct Test<T> {
    name: T,
}

throws a compile error

missing generics for struct `Test`
expected 1 generic argument
main.rs(4, 8): struct defined here, with 1 generic parameter: `T`
main.rs(4, 12): add missing generic argument: `<T>`

It appears that the SerializedBytes derive macro is not working with struct containing generic parameters. Is this a bug or a known limitation?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions