From f755d89f3aa2bae5bd6fa02f3dc3356766cda27e Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Thu, 14 Sep 2023 17:32:31 -0700 Subject: [PATCH] Delete dead code --- .../src/main/scala/munit/MUnitRunner.scala | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/munit/shared/src/main/scala/munit/MUnitRunner.scala b/munit/shared/src/main/scala/munit/MUnitRunner.scala index a081d81b..275aa98c 100644 --- a/munit/shared/src/main/scala/munit/MUnitRunner.scala +++ b/munit/shared/src/main/scala/munit/MUnitRunner.scala @@ -361,40 +361,6 @@ class MUnitRunner(val cls: Class[_ <: Suite], newInstance: () => Suite) } } - private[munit] class ForeachUnsafeResult( - val sync: Try[Unit], - val async: List[Future[Any]] - ) - private def foreachUnsafe( - thunks: Iterable[() => Any] - ): ForeachUnsafeResult = { - var errors = mutable.ListBuffer.empty[Throwable] - val async = mutable.ListBuffer.empty[Future[Any]] - thunks.foreach { thunk => - try { - thunk() match { - case f: Future[_] => - async += f - case _ => - } - } catch { - case ex if NonFatal(ex) => - errors += ex - } - } - errors.toList match { - case head :: tail => - tail.foreach { e => - if (e ne head) { - head.addSuppressed(e) - } - } - new ForeachUnsafeResult(scala.util.Failure(head), Nil) - case _ => - new ForeachUnsafeResult(scala.util.Success(()), Nil) - } - } - private def runHiddenTest( notifier: RunNotifier, name: String,