我正在尝试使用以下方法将 Rust 中的字符串收集到一个 vec 中:
let fields : ~[~str] = row.split_str(",").collect();
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:预期 std::iter::FromIterator<&str>, but found std::iter::FromIterator<~str> (str storage differents: expected &but found ~)
我尝试使用类型提示但没有成功