From 28fac634bcc38cb118a4a8a81c4d808ec329b7c9 Mon Sep 17 00:00:00 2001 From: Ben Challenor Date: Sun, 3 May 2015 15:43:09 +0100 Subject: [PATCH] Idiomatic scala - remove explicit return --- compiler/src/test/scala/org/capnproto/TestUtil.scala | 2 +- runtime/src/test/scala/org/capnproto/LayoutSuite.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/src/test/scala/org/capnproto/TestUtil.scala b/compiler/src/test/scala/org/capnproto/TestUtil.scala index 2080c0f..f157135 100644 --- a/compiler/src/test/scala/org/capnproto/TestUtil.scala +++ b/compiler/src/test/scala/org/capnproto/TestUtil.scala @@ -30,7 +30,7 @@ object TestUtil { def data(str : String) : Array[Byte] = { try { - return str.getBytes("ISO_8859-1") + str.getBytes("ISO_8859-1") } catch { case e: Exception => throw new Error("could not decode") } diff --git a/runtime/src/test/scala/org/capnproto/LayoutSuite.scala b/runtime/src/test/scala/org/capnproto/LayoutSuite.scala index 3c07473..2a8f778 100644 --- a/runtime/src/test/scala/org/capnproto/LayoutSuite.scala +++ b/runtime/src/test/scala/org/capnproto/LayoutSuite.scala @@ -29,7 +29,7 @@ class LayoutSuite extends FunSuite { class BareStructReader extends StructReader.Factory[StructReader] { def constructReader(segment: org.capnproto.SegmentReader, data: Int, pointers: Int, dataSize: Int, pointerCount: Short, nestingLimit:Int) : StructReader = { - return new StructReader(segment,data,pointers,dataSize,pointerCount,nestingLimit) + new StructReader(segment,data,pointers,dataSize,pointerCount,nestingLimit) } } @@ -123,7 +123,7 @@ class LayoutSuite extends FunSuite { def constructBuilder(segment: org.capnproto.SegmentBuilder, data: Int, pointers: Int, dataSize: Int, pointerCount: Short) : StructBuilder = { - return new StructBuilder(segment,data,pointers,dataSize,pointerCount) + new StructBuilder(segment,data,pointers,dataSize,pointerCount) } }