Rust solution
\nimpl Solution {\n    pub fn convert_to_base7(mut num: i32) -> String {\n        let (mut res, mut base) = (0, 1);\n        while num != 0 {\n            res +
```\nimpl Solution {\n    pub fn convert_to_base7(mut num: i32) -> String {\n        let (mut res, mut base) = (0, 1);\n        while num != 0 {\n            res += base * (num % 7);\n            base *= 10;\n            num /= 7;\n        }\n        res.to_string()\n    }\n}\n```
['Rust']