From c7696d83fa57b9e28ddbd218d6119d05b92da0c3 Mon Sep 17 00:00:00 2001 From: Mathew Polzin Date: Fri, 15 Nov 2019 17:46:53 -0800 Subject: [PATCH] update Playground pages to run --- .../Contents.swift | 2 +- .../Pages/Usage.xcplaygroundpage/Contents.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/JSONAPI.playground/Pages/Full Client & Server Example.xcplaygroundpage/Contents.swift b/JSONAPI.playground/Pages/Full Client & Server Example.xcplaygroundpage/Contents.swift index eabd561..96a7168 100644 --- a/JSONAPI.playground/Pages/Full Client & Server Example.xcplaygroundpage/Contents.swift +++ b/JSONAPI.playground/Pages/Full Client & Server Example.xcplaygroundpage/Contents.swift @@ -37,7 +37,7 @@ typealias ToManyRelationship = JSONAPI.ToManyRelationship = JSONAPI.Document> +typealias Document = JSONAPI.Document> // MARK: Entity Definitions diff --git a/JSONAPI.playground/Pages/Usage.xcplaygroundpage/Contents.swift b/JSONAPI.playground/Pages/Usage.xcplaygroundpage/Contents.swift index e5434e5..5917bef 100644 --- a/JSONAPI.playground/Pages/Usage.xcplaygroundpage/Contents.swift +++ b/JSONAPI.playground/Pages/Usage.xcplaygroundpage/Contents.swift @@ -64,11 +64,11 @@ if case let .data(bodyData) = peopleResponse.body { // MARK: - Work in the abstract print("-----") -func process(document: T) { - guard case let .data(body) = document.body else { +func process(document: T) { + guard let body = document.body.data else { return } - let x: T.Body.Data = body + let x: T.BodyData = body } process(document: peopleResponse)