It seems simple enough. I have a vector of i32 values. I just want to make that into a string. in my example, stuff_str would be “55208”;
Here’s the code:
let stuff = vec![5, 5, 2, 0, 8];
let stuff_str: String = stuff.into_iter().collect::<i32>().to_string();
But I get compile error:
|
52 | let stuff_str: String = stuff.into_iter().collect::<i32>().to_string();
| ^^^^^^^ a collection of type `i32` cannot be built from an iterator over elements of type `{integer}`
|
I tried a few different things but am having a block here.
Thnx for the help
Matt