I’m just playing around with Rust (just went through the first chapter in the Rust book). I’m trying to define a mutable vector of mutable strings, with an explicit type annotation, but I can’t figure out how.
I feel I must be missing something really basic, but I can’t find any clear explanation anywhere - all questions and references about type annotations seem to be about lifetime annotations, which I haven’t delved into yet.
I know that type annotations are usually optional, but I’m just trying out Rust and would like to learn to define them
I’ve tried the following, they both fail to compile:
let v : mut Vec<mut String> = Vec::new(); let v : Vec<mut String> mut = Vec::new();