From 51db55d84760f301c6af0501d395df47b0930fdc Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Mon, 12 Mar 2012 04:44:27 +0530 Subject: [PATCH] Replace `Pair.apply` with `Util.pairID`, avoids extra class generation --- util/collection/Util.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/collection/Util.scala b/util/collection/Util.scala index 608284c98..429a1b61d 100644 --- a/util/collection/Util.scala +++ b/util/collection/Util.scala @@ -27,4 +27,6 @@ object Util case 1 => Some("1 " + prefix + single) case x => Some(x.toString + " " + prefix + plural) } -} \ No newline at end of file + + def pairID[A,B] = (a: A, b: B) => (a,b) +}