Rust: Reduce verbosity of the example code