(s: String)
| 25 | } |
| 26 | |
| 27 | pub fn calculate(s: String) -> i32 { |
| 28 | let mut x = 1; |
| 29 | let mut y = 0; |
| 30 | for c in s.chars() { |
| 31 | if c == 'A' { |
| 32 | x = 2 * x + y; |
| 33 | } else { |
| 34 | y = 2 * y + x |
| 35 | } |
| 36 | } |
| 37 | x + y |
| 38 | } |
nothing calls this directly
no outgoing calls
no test coverage detected