Wpis z mikrobloga

Hej,
W jaki sposób mogę zapisać dane zwrócone przez split do Vec?

Mam taki kod

pub fn setexcludedirectory(& mut self,mut excludedirectory : String) -> bool{
exclude
directory = excludedirectory.replace("\"","");
let directories : Vec = exclude
directory.split(",").collect();

Ale wywala błąd

value of type std::vec::Vec cannot be built from std::iter::Iterator
#rustlang
  • 1