From 9a1c4b945131d5b1bb9cf931d893737439fe412a Mon Sep 17 00:00:00 2001 From: Jakob Odersky Date: Wed, 14 Feb 2018 15:09:41 -0800 Subject: Formatting --- src/main/scala/DerivedFormats.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/scala/DerivedFormats.scala') diff --git a/src/main/scala/DerivedFormats.scala b/src/main/scala/DerivedFormats.scala index 4fc096e..93e2640 100644 --- a/src/main/scala/DerivedFormats.scala +++ b/src/main/scala/DerivedFormats.scala @@ -38,7 +38,7 @@ trait DerivedFormats { self: BasicFormats => def dispatch[T](ctx: SealedTrait[JsonFormat, T]): JsonFormat[T] = { val typeFieldName = ctx.annotations - .collectFirst{ + .collectFirst { case g: gadt => g.typeFieldName } .getOrElse("type") @@ -74,7 +74,7 @@ trait DerivedFormats { self: BasicFormats => s"because type '${typeName}' is unsupported.") } } - } + } } implicit def gen[T]: JsonFormat[T] = macro Magnolia.gen[T] -- cgit v1.2.3