How to convert an integer to a String in Rust?
Hello everyone! I just started learning Rust and ran into a problem: I need to convert an integer to a string to print it or concatenate it with other strings. In other languages (e.g., Python or JavaScript) this is done very simply — str(42) or (42).toString(). But in Rust I can't find a direct equivalent.\n\nHere's my code:\n\n```rust\nfn main() {\n let number: i32 = 42;\n let message = "Answer: " + number; // Error!\n println!("{}", message);\n}\n```\n\nThe compiler gives an error: `cannot add `i32` to `&str``. I understand that Rust is strongly typed, but how do I properly convert a number to a string? I tried using `number.to_string()`, but I'm not sure if that's the best way. Are there other methods? And what should I do if I need to convert a number to `&str` instead of `String`? I'll be