Code I wrote as a Rust newbie