例如:
// just an example, can be any Iterator<Item = char>
let iter = "hello".chars();
let mut path = std::path::PathBuf::new();
// works but is inefficient
path.push(iter.collect::<String>());
// does not work:
// path.push(iter);
// if path were String we could do
// path.extend(iter)
println!("{:?}", path);