From 968bdbe50653186db0a4e318beb453a946d3e452 Mon Sep 17 00:00:00 2001 From: Tianran Ding Date: Tue, 26 Oct 2021 10:29:08 +1300 Subject: [PATCH] Fixed: swift compiler warnings against deprecated 'class' --- Hanson/Bindable/Bindable.swift | 2 +- Hanson/Event Publisher/EventPublisher.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Hanson/Bindable/Bindable.swift b/Hanson/Bindable/Bindable.swift index 0379e72..be71115 100644 --- a/Hanson/Bindable/Bindable.swift +++ b/Hanson/Bindable/Bindable.swift @@ -9,7 +9,7 @@ import Foundation /// Types conforming to the `Bindable` protocol can be updated with a new value when an event is published from an `EventPublisher`. Both ends of a binding should implement the `Bindable` protocol, as the receiving bindable will be set to the value of the source bindable when the binding is made. -public protocol Bindable: class { +public protocol Bindable: AnyObject { /// The type of value of the bindable. associatedtype Value diff --git a/Hanson/Event Publisher/EventPublisher.swift b/Hanson/Event Publisher/EventPublisher.swift index 911e40f..b5e4815 100644 --- a/Hanson/Event Publisher/EventPublisher.swift +++ b/Hanson/Event Publisher/EventPublisher.swift @@ -9,7 +9,7 @@ import Foundation /// Types conforming to the `EventPublisher` protocol can publish and be observed for events. -public protocol EventPublisher: class { +public protocol EventPublisher: AnyObject { /// The type of event that the event publisher publishes. associatedtype Event