From f3a5990e124727e5b54ec170eec19688e093eb4e Mon Sep 17 00:00:00 2001 From: David Cordero Date: Wed, 19 May 2021 17:33:23 +0200 Subject: [PATCH] Fix warning. Using 'class' for protocol inheritance is deprecated --- Cartography/LayoutItem.swift | 2 +- Cartography/LayoutProxy.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cartography/LayoutItem.swift b/Cartography/LayoutItem.swift index 4c8b9494..7d7d14b6 100644 --- a/Cartography/LayoutItem.swift +++ b/Cartography/LayoutItem.swift @@ -6,7 +6,7 @@ // Copyright © 2017 Robert Böhnke. All rights reserved. // -public protocol LayoutItem: class { +public protocol LayoutItem: AnyObject { associatedtype ProxyType: LayoutProxy func asProxy(context: Context) -> ProxyType diff --git a/Cartography/LayoutProxy.swift b/Cartography/LayoutProxy.swift index d342db77..6100c439 100644 --- a/Cartography/LayoutProxy.swift +++ b/Cartography/LayoutProxy.swift @@ -14,7 +14,7 @@ import UIKit import AppKit #endif -public protocol LayoutProxy: class { +public protocol LayoutProxy: AnyObject { var context: Context { get } var item: AnyObject { get } //type-erased Layoutitem }