Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Split off messages function into their own trait #55

Merged
merged 3 commits into from
May 14, 2024

Conversation

ErinvanderVeen
Copy link

@ErinvanderVeen ErinvanderVeen commented May 14, 2024

Issue: #53

Description

This PR splits of the messages() function of the BackendHandle trait into its own BackendHandleMessages trait. This removes the previously used feature, and ensures the BackendHandle trait is always object safe.

Motivation

Previously, a cargo bug would union all features of a crate in the dependency tree. This means that cargo COMMAND would fail because genealogos-api required the BackendHandle to be object safe, and genealogos-cli required the BackendHandle trait to implement the messages() function.

As a result, cargo dist, cargo build, rust-analyzer, and many other commands would fail. This PR resolves that issue.

Checklist

Checklist before merging:

  • CHANGELOG.md updated
  • README.md up-to-date

@ErinvanderVeen ErinvanderVeen marked this pull request as ready for review May 14, 2024 08:04
@ErinvanderVeen ErinvanderVeen changed the title Split of messages function into their own trait Split off messages function into their own trait May 14, 2024
Copy link
Member

@yannham yannham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks better without cargo-hack 🙂

@ErinvanderVeen ErinvanderVeen merged commit f673b23 into master May 14, 2024
9 checks passed
@ErinvanderVeen ErinvanderVeen deleted the trait-object-safety branch May 14, 2024 09:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants