1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
type E = (usize, u64); use crate::graph_edge_trait::{ To, Weight, }; impl To for E { type V = usize; fn to(&self) -> &usize { &self.0 } } impl Weight for E { type T = u64; fn weight(&self) -> &u64 { &self.1 } }