Practicing Rust based on the Book: 'Learning Rust with Entirely Too Many Linked Lists'
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

NOTES.md 801B

Lessons from Stack 1

When you need to do the ol’ switcheroo with some memory mem::replace comes in useful.

Lessons from Stack 2

take() is handy, read more about this. Sometimes you just have to get your hands dirty and do some lifetimes, just a fact of life, get used to it son. Revise some of these impl types, to understand better how they function with std library collections.

Lessons from Stack 3

and_then() allows you to map over a value returning an option. Useful for when the type mapping is an option.

Lessons from Stack 4

It’s important to conceptualise the invariants before you write code to validate assumptions and edge cases. borrow() and borrow_mut() are important methods when using RefCell. Drop can be implemented with popping until no elements are left.