Rust: Problem 6