proper type, following Bus.event;
authorwenzelm
Tue, 29 Aug 2023 19:17:25 +0200
changeset 78615 abdf38ee314a
parent 78614 4da5cdaa4dcd
child 78616 9acd819db33a
proper type, following Bus.event;
src/Tools/Graphview/mutator_event.scala
--- a/src/Tools/Graphview/mutator_event.scala	Tue Aug 29 18:17:04 2023 +0200
+++ b/src/Tools/Graphview/mutator_event.scala	Tue Aug 29 19:17:25 2023 +0200
@@ -16,7 +16,7 @@
   case class Add(m: Mutator.Info) extends Message
   case class New_List(m: List[Mutator.Info]) extends Message
 
-  type Receiver = PartialFunction[Message, Unit]
+  type Receiver = Message => Unit
 
   class Bus {
     private val receivers = Synchronized[List[Receiver]](Nil)
@@ -25,4 +25,4 @@
     def -= (r: Receiver): Unit = receivers.change(Library.remove(r))
     def event(x: Message): Unit = receivers.value.reverse.foreach(r => r(x))
   }
-}
\ No newline at end of file
+}