book
book copied to clipboard
Show the implementation of std::mem::drop in Chapter 15.3
When the chapter 15.3 introduces the drop function we should show the implementation:
pub fn drop<T>(_x: T) {}
In my option this helps to better understand the difference between c.drop() and drop(c), showing that the "magic" is just the function taking ownership of the value.
Also a bonus: it flexes on the elegance of Rust 😉