Code snippets from learning Rust