【发布时间】:2015-08-12 22:15:50
【问题描述】:
查看文档或 Rust 0.12,我看到 the following method 将多个值推送到已经存在的 Vec:
fn push_all(&mut self, other: &[T])
但是,如果我有一个迭代器,我认为使用它不是有效的:vector.push_all(it.collect().as_ref())。有没有更有效的方法?
【问题讨论】:
标签: collections rust iterator