Skip to content

Commit 7a0176f

Browse files
authored
Merge pull request #72 from NthPortal/future-onsuccess
Remove use of deprecated Future.onSuccess
2 parents 2fe4b94 + 17753c8 commit 7a0176f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/src/main/scala/scala/swing/examples/tutorials/components/IconDemoApp.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,15 @@ class IconDemoApp extends MainFrame {
123123
}.toList
124124
}
125125

126-
f.onSuccess{
127-
case thumbs:List[Option[ThumbnailAction]] =>
126+
f.foreach {
127+
thumbs:List[Option[ThumbnailAction]] =>
128128
buttonBar.contents.dropRight(1)
129129
thumbs.foreach{ thumbAction => {
130130
thumbAction.foreach { ta =>
131131
buttonBar.contents += new Button(ta)
132132
}
133133
}}
134134
buttonBar.contents += Swing.Glue
135-
136135
}
137136

138137

0 commit comments

Comments
 (0)