Skip to content

Commit 4de34cc

Browse files
authored
Distance ordering should not be hard coded (#14)
* Distance ordering should not be hard coded * CHANGELOG
1 parent 1854956 commit 4de34cc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ More infos about this file : http://keepachangelog.com/
66

77
## [Unreleased] - no_due_date
88

9+
- **Distance ordering should not be hard coded**
10+
911
## [v0.3.1] - 2018.01.19
1012

1113
- **Small optimisation: Do not call the geocoder if origin == destination**

src/main/scala/com/guizmaii/distances/Types.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ object Types {
1414

1515
final case class LatLong(latitude: Double, longitude: Double)
1616

17-
final case class Distance(length: Length, duration: Duration) extends Ordered[Distance] {
18-
override def compare(that: Distance): Int = this.duration.compareTo(that.duration)
19-
}
17+
final case class Distance(length: Length, duration: Duration)
2018

2119
object Distance {
2220
private[distances] def apply(s: SerializableDistance): Distance =

0 commit comments

Comments
 (0)