Skip to content

Instantly share code, notes, and snippets.

@rpjohnst
rpjohnst / playground.rs
Created May 21, 2017 21:11 — forked from anonymous/playground.rs
Shared via Rust Playground
fn build<V>(n: usize) -> Vec<V> where V: Clone + Default {
vec![V::default(); n]
}
fn compute() -> Vec<Vec<i32>> {
let mut values = build(2);
values[0].push(1);
values
}