[Rust] solution
There is no magic here, just iterate over the string and count the length of consecutive substring. \n\n### Rust Solution\nRust\nimpl Solution {\n    pub fn max
There is no magic here, just iterate over the string and count the length of consecutive substring. \n\n### Rust Solution\n```Rust\nimpl Solution {\n    pub fn max_power(s: String) -> i32 {\n       let (mut res, mut cnt) = (0, 0);\n       let mut pre = \'#\' ;\n       for c in s.chars() {\n           if c == pre {\n               cnt += 1; \n               res = std::cmp::max(res, cnt);\n           } else {\n               pre = c;\n               cnt = 1;\n           }\n       }\n       max(res, 1) \n    }\n}\n```
[]