(&self, v: usize)
| 42 | } |
| 43 | |
| 44 | fn path_to(&self, v: usize) -> Option<LinkedList<usize>> { |
| 45 | if self.has_path(v) { |
| 46 | let mut paths = LinkedList::default(); |
| 47 | let s = self.s; |
| 48 | let mut x = v; |
| 49 | |
| 50 | while x != s { |
| 51 | paths.push_front(x); |
| 52 | x = self.edge_to[x]; |
| 53 | } |
| 54 | paths.push_front(s); |
| 55 | |
| 56 | Some(paths) |
| 57 | } else { |
| 58 | None |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | impl Paths for BreadthFirstPaths { |
nothing calls this directly
no test coverage detected