How to print a vector (Vec) to the screen in Rust? Examples with println! and formatting
Hello everyone! I just started learning Rust and encountered a seemingly simple task: I need to print the contents of a vector to the screen. I'm writing a small program for number processing, and I want to see what's stored in my `Vec`.\n\nThe problem is that when I try to use the `println!` macro directly, the compiler gives an error. Here's my code:\n\n```rust\nfn main() {\n let numbers = vec![1, 2, 3, 4, 5];\n println!("My vector: {}", numbers);\n}\n```\n\nThe compiler says something like: "`Vec` doesn't implement `std::fmt::Display`". I understand this is related to formatting traits, but I don't fully understand it. I tried adding `{:?}`, and it worked, but the output was ugly — everything in one line with square brackets. But I would like, for example, to print each element