Rust solution
\nimpl Solution {\n    pub fn minimum_moves(s: String) -> i32 {\n        s.into_bytes()\n            .iter()\n            .enumerate()\n            .filter(|&(_
```\nimpl Solution {\n    pub fn minimum_moves(s: String) -> i32 {\n        s.into_bytes()\n            .iter()\n            .enumerate()\n            .filter(|&(_, b)| *b == b\'X\')\n            .fold((0, 0), |(mut moves, mut next_ind), (ind, b)| {\n                if ind >= next_ind {\n                    moves += 1;\n                    next_ind = ind + 3\n                };\n                (moves, next_ind)\n            })\n            .0\n    }\n}\n```
['Rust']