Rust two-liner
\nimpl Solution {\n    pub fn sort_array_by_parity(mut nums: Vec<i32>) -> Vec<i32> {\n        nums.sort_by_key(|num| num % 2);\n        nums\n    }\n}\n\n
```\nimpl Solution {\n    pub fn sort_array_by_parity(mut nums: Vec<i32>) -> Vec<i32> {\n        nums.sort_by_key(|num| num % 2);\n        nums\n    }\n}\n```\n
['Rust']