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

Add freestanding default() #18

Merged
merged 1 commit into from
Apr 2, 2024
Merged

Add freestanding default() #18

merged 1 commit into from
Apr 2, 2024

Conversation

flippette
Copy link
Contributor

@flippette flippette commented Apr 1, 2024

The freestanding default() function, formerly available under #![feature(default_free_fn)], was removed in rust-lang/rust#113469. I've seen it used in some projects' docs (namely bevy), and I think it's at the same time less unwieldy than StructWithReallyLongName::default(), less ugly than <_>::default(), and less stuttery than Default::default().

@flippette flippette requested a review from popzxc as a code owner April 1, 2024 16:52
@popzxc popzxc merged commit b371425 into popzxc:master Apr 2, 2024
4 of 5 checks passed
@popzxc
Copy link
Owner

popzxc commented Apr 2, 2024

Thanks!

@popzxc
Copy link
Owner

popzxc commented Apr 2, 2024

Published in 0.3.3

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

Successfully merging this pull request may close these issues.

2 participants