diff --git a/util/complete/History.scala b/util/complete/History.scala index bf009f626..e792454f7 100644 --- a/util/complete/History.scala +++ b/util/complete/History.scala @@ -6,7 +6,7 @@ package complete import History.number -final class History private(lines: IndexedSeq[String], error: (=> String) => Unit) extends NotNull +final class History private(lines: IndexedSeq[String], error: String => Unit) extends NotNull { private def reversed = lines.reverse @@ -41,7 +41,7 @@ final class History private(lines: IndexedSeq[String], error: (=> String) => Uni object History { - def apply(lines: Seq[String], error: (=> String) => Unit): History = new History(lines.toIndexedSeq, error) + def apply(lines: Seq[String], error: String => Unit): History = new History(lines.toIndexedSeq, error) def number(s: String): Option[Int] = try { Some(s.toInt) } diff --git a/util/complete/HistoryCommands.scala b/util/complete/HistoryCommands.scala index a03c9cfca..a5b321d8c 100644 --- a/util/complete/HistoryCommands.scala +++ b/util/complete/HistoryCommands.scala @@ -38,7 +38,7 @@ object HistoryCommands def printHelp(): Unit = println(helpString) - def apply(s: String, historyPath: Option[Path], maxLines: Int, error: (=> String) => Unit): Option[List[String]] = + def apply(s: String, historyPath: Option[Path], maxLines: Int, error: String => Unit): Option[List[String]] = if(s.isEmpty) { printHelp()