Skip to content

Improve #[derive(...)] in declare_class! #267

@madsmtm

Description

@madsmtm

Deriving PartialEq, Eq and Hash automatically in extern_class! works because it delegates to a msg_send! call to the relevant selector.

#[derive(Debug)], however, prints out the internal variable name as well as helpers that ensure that the type has the correct auto traits, which is really ugly, so we should use some macro hacks to extract and implement it ourselves as a direct delegation to the superclass' Debug instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-objc2Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesenhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions