Use new std::vec functions

Rust changed the std::vec syntax. I'm new to Rust, so I'm not sure if this is correct. When running `make test` 2 tests failed on my system (don't know if they were failing before though).