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

Remove box pattern #2

Merged
merged 2 commits into from Feb 20, 2017
Merged

Conversation

faern
Copy link
Contributor

@faern faern commented Jan 18, 2017

Hi!

Here is a way to destructure the boxes without the unstable box pattern. Makes all the tests pass on stable Rust.

Not fully sure I didn't miss any strange case since this is unsafe and all. But maybe you can spot any potential problems?

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 98.315% when pulling a2410ed on faern:remove-box-pattern into a6533f5 on jeromefroe:master.

@faern
Copy link
Contributor Author

faern commented Jan 18, 2017

Here is a text about why this very special moving dereferencing works on Box: https://manishearth.github.io/blog/2017/01/10/rust-tidbits-box-is-special/

@jeromefroe jeromefroe merged commit ac46fa2 into jeromefroe:master Feb 20, 2017
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.

None yet

3 participants