From effb1f591b38c2346169299bc2776789a1c1abe6 Mon Sep 17 00:00:00 2001 From: Alberto De Bortoli Date: Fri, 3 May 2019 13:33:41 +0100 Subject: [PATCH] Fix playground --- Example/GettingStarted.playground/Contents.swift | 2 +- Example/GettingStarted.playground/contents.xcplayground | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Example/GettingStarted.playground/Contents.swift b/Example/GettingStarted.playground/Contents.swift index 6f16932..be414dd 100644 --- a/Example/GettingStarted.playground/Contents.swift +++ b/Example/GettingStarted.playground/Contents.swift @@ -125,7 +125,7 @@ func map(data: [Dictionary]) -> Future<[FooBar]> { print(#function) print("data: " + String(describing: data)) let promise = Promise<[FooBar]>() - promise.setResult(data.flatMap { obj -> FooBar? in + promise.setResult(data.compactMap { obj -> FooBar? in if let value = obj["key"] as? String { return FooBar(value: value) } diff --git a/Example/GettingStarted.playground/contents.xcplayground b/Example/GettingStarted.playground/contents.xcplayground index 712c41f..3596865 100644 --- a/Example/GettingStarted.playground/contents.xcplayground +++ b/Example/GettingStarted.playground/contents.xcplayground @@ -1,4 +1,4 @@ - + \ No newline at end of file