Skip to content

Commit ba69598

Browse files
committed
Clean up of benchmarks
1 parent 3b4dbe6 commit ba69598

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

jsoniter-scala-benchmark/shared/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/benchmark/UPickleReaderWriters.scala

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,18 @@ object UPickleReaderWriters extends AttributeTagged {
4444
val base64ReadWriter: ReadWriter[Array[Byte]] =
4545
readwriter[String].bimap(Base64.getEncoder.encodeToString, Base64.getDecoder.decode)
4646
implicit val extractFieldsReadWriter: ReadWriter[ExtractFields] = macroRW
47-
implicit val simpleGeometryReadWriter: ReadWriter[GeoJSON.SimpleGeometry] =
48-
ReadWriter.merge(tagName, macroRW[GeoJSON.Point], macroRW[GeoJSON.MultiPoint], macroRW[GeoJSON.LineString],
49-
macroRW[GeoJSON.MultiLineString], macroRW[GeoJSON.Polygon], macroRW[GeoJSON.MultiPolygon])
50-
implicit val geometryReadWriter: ReadWriter[GeoJSON.Geometry] =
51-
ReadWriter.merge(tagName, macroRW[GeoJSON.Point], macroRW[GeoJSON.MultiPoint], macroRW[GeoJSON.LineString],
52-
macroRW[GeoJSON.MultiLineString], macroRW[GeoJSON.Polygon], macroRW[GeoJSON.MultiPolygon],
53-
macroRW[GeoJSON.GeometryCollection])
54-
implicit val simpleGeoJsonReadWriter: ReadWriter[GeoJSON.SimpleGeoJSON] =
55-
ReadWriter.merge(tagName, macroRW[GeoJSON.Feature])
56-
implicit val geoJsonReadWriter: ReadWriter[GeoJSON.GeoJSON] =
47+
implicit val geoJsonReadWriter: ReadWriter[GeoJSON.GeoJSON] = {
48+
implicit val v1: ReadWriter[GeoJSON.SimpleGeometry] =
49+
ReadWriter.merge(tagName, macroRW[GeoJSON.Point], macroRW[GeoJSON.MultiPoint], macroRW[GeoJSON.LineString],
50+
macroRW[GeoJSON.MultiLineString], macroRW[GeoJSON.Polygon], macroRW[GeoJSON.MultiPolygon])
51+
implicit val v2: ReadWriter[GeoJSON.Geometry] =
52+
ReadWriter.merge(tagName, macroRW[GeoJSON.Point], macroRW[GeoJSON.MultiPoint], macroRW[GeoJSON.LineString],
53+
macroRW[GeoJSON.MultiLineString], macroRW[GeoJSON.Polygon], macroRW[GeoJSON.MultiPolygon],
54+
macroRW[GeoJSON.GeometryCollection])
55+
implicit val v3: ReadWriter[GeoJSON.SimpleGeoJSON] =
56+
ReadWriter.merge(tagName, macroRW[GeoJSON.Feature])
5757
ReadWriter.merge(tagName, macroRW[GeoJSON.Feature], macroRW[GeoJSON.FeatureCollection])
58+
}
5859
implicit val gitHubActionsAPIFromTos: ReadWriter[GitHubActionsAPI.Response] = {
5960
implicit val v1: ReadWriter[Boolean] =
6061
ReadWriter.join(strReader(x => java.lang.Boolean.parseBoolean(x.toString)), strWriter[Boolean])

0 commit comments

Comments
 (0)