Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore: deprecate void crate #5676

Merged
merged 1 commit into from
Nov 14, 2024
Merged

Conversation

hanabi1224
Copy link
Contributor

@hanabi1224 hanabi1224 commented Nov 14, 2024

Description

The void crate provides a Void type that is conceptually equivalent to the never type(!). This PR tries to remove void crate from the dependency tree by replacing void::Void with std::convert::Infallible that will eventually become an alias of the never type(!)

This enum has the same role as the ! “never” type, which is unstable in this version of Rust. When ! is stabilized, we plan to make Infallible a type alias to it:

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@hanabi1224 hanabi1224 marked this pull request as ready for review November 14, 2024 13:57
Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

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

Hi, and thanks for this! ❤️

@jxs jxs added the send-it label Nov 14, 2024
@mergify mergify bot merged commit 0c34d9f into libp2p:master Nov 14, 2024
71 of 72 checks passed
@dariusc93
Copy link
Member

dariusc93 commented Nov 14, 2024

Might want to update the Cargo.toml to bump the versions on them :)

EDIT: And changelogs

@dariusc93
Copy link
Member

CC @hanabi1224 @jxs

@hanabi1224 hanabi1224 deleted the deprecate-void branch November 14, 2024 23:32
@jxs
Copy link
Member

jxs commented Nov 15, 2024

Thanks for the reminding Darius, and I am sorry I didn't state explicitly why I moved ahead without asking for it.
I think in this case it's mostly redundant since it's only a dependency that we stop using, wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants