print all trees
parent
9e142003f1
commit
a2d373d426
15
src/main.rs
15
src/main.rs
|
|
@ -34,13 +34,18 @@ fn main() {
|
||||||
|
|
||||||
println!("Computed {} {} for program", trees.len(), pluralize(trees.len(), "tree", "trees"));
|
println!("Computed {} {} for program", trees.len(), pluralize(trees.len(), "tree", "trees"));
|
||||||
|
|
||||||
let tree = trees[0].borrow();
|
for tree in trees {
|
||||||
|
println!("{}", tree);
|
||||||
|
println!("---");
|
||||||
|
let program = Program::new(&tree);
|
||||||
|
|
||||||
|
println!("{:#?}", program);
|
||||||
|
|
||||||
|
println!("---");
|
||||||
|
}
|
||||||
|
|
||||||
let program = Program::new(tree);
|
// let tree = trees[0].borrow();
|
||||||
|
|
||||||
println!("{:#?}", program);
|
|
||||||
|
|
||||||
println!("---");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn pluralize<'a>(n: usize, singular: &'a str, plural: &'a str) -> &'a str {
|
fn pluralize<'a>(n: usize, singular: &'a str, plural: &'a str) -> &'a str {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue