Commit
Author: Kevin Schoon [kevinschoon@gmail.com]
Committer: GitHub [noreply@github.com] Fri, 05 Jul 2019 15:35:05 +0000
Hash: 1129524cd5383aed4f656149ea7f9f7c626d986e
Timestamp: Fri, 05 Jul 2019 15:35:05 +0000 (5 years ago)

+1 -1 +/-1 browse
Merge pull request #1 from bcicen/master
Merge pull request #1 from bcicen/master

fix shortest call arg
1diff --git a/graph.go b/graph.go
2index 213139e..0f0b68f 100644
3--- a/graph.go
4+++ b/graph.go
5 @@ -36,7 +36,7 @@ func Load(airports AirportMap, routes []Route, weighters ...Weighter) graph.Grap
6
7 func Find(start, end Airport, g graph.Graph) Itinerary {
8 shortest := path.DijkstraFrom(start, g)
9- path, weight := shortest.To(end)
10+ path, weight := shortest.To(end.ID())
11 var airports []Airport
12 for _, p := range path {
13 airports = append(airports, p.(Airport))