blob: 4f732e7948834f7cb3a3ace9982a9d02da13a330 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
mod graph;
use graph::Graph;
fn main() {
let mut g = Graph::new();
g.edge("a", "b", 10);
g.edge("a", "c", 10);
g.edge("a", "d", 10);
// Ahh this is hard
let v = g.borrow_vertex("a").unwrap();
let v23 = v.borrow();
let mut it = v23.adj.iter();
for e in it {
println!("{}", e.borrow());
}
println!("Hello, world!");
}
|