From 7c7af7c998e75a0bb6caa31540c1a9c46606afcd Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Sat, 19 Mar 2011 00:04:07 -0400 Subject: [PATCH] use 'distinct' for State.++ to ensure commands are not duplicated --- main/State.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/State.scala b/main/State.scala index 59f522ab8..e913ff732 100644 --- a/main/State.scala +++ b/main/State.scala @@ -55,7 +55,7 @@ object State s.copy(commands = s.commands.drop(1)) def ::: (newCommands: Seq[String]): State = s.copy(commands = newCommands ++ s.commands) def :: (command: String): State = (command :: Nil) ::: this - def ++ (newCommands: Seq[Command]): State = s.copy(processors = s.processors ++ newCommands) + def ++ (newCommands: Seq[Command]): State = s.copy(processors = (s.processors ++ newCommands).distinct) def + (newCommand: Command): State = this ++ (newCommand :: Nil) def baseDir: File = s.configuration.baseDirectory def setNext(n: Next.Value) = s.copy(next = n)