Review and correct Rust code for memory safety and idiomatic style, ensuring AI-generated code aligns with Rust's goals. Requires expertise in Rust and experience in systems programming.