Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/fifth-layout-basics-redux.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ So instead we're going to use the very nice [Box::into_raw][] function:
> let x = unsafe { Box::from_raw(ptr) };
> ```

Nice, that looks *literally* designed for our use case. It also matches the rules we're trying to follow: start with safe stuff, turn into into raw pointers, and then only convert back to safe stuff at the end (when we want to Drop it).
Nice, that looks *literally* designed for our use case. It also matches the rules we're trying to follow: start with safe stuff, turn into raw pointers, and then only convert back to safe stuff at the end (when we want to Drop it).

This is basically exactly like doing the weird `real_next` thing but without having to faff around storing the Box when it's the exact same pointer as the raw pointer anyway.

Expand Down