Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a deprecation warning where some protocols were inheriting from class instead of AnyObject per Xcode's suggestion #819

Merged
merged 1 commit into from
Mar 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Disposable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/// Represents something that can be “disposed”, usually associated with freeing
/// resources or canceling work.
public protocol Disposable: class {
public protocol Disposable: AnyObject {
/// Whether this disposable has been disposed already.
var isDisposed: Bool { get }

Expand Down
2 changes: 1 addition & 1 deletion Sources/Property.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Glibc
///
/// Only classes can conform to this protocol, because having a signal
/// for changes over time implies the origin must have a unique identity.
public protocol PropertyProtocol: class, BindingSource {
public protocol PropertyProtocol: AnyObject, BindingSource {
/// The current value of the property.
var value: Value { get }

Expand Down
2 changes: 1 addition & 1 deletion Sources/Scheduler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Foundation
#endif

/// Represents a serial queue of work items.
public protocol Scheduler: class {
public protocol Scheduler: AnyObject {
/// Enqueues an action on the scheduler.
///
/// When the work is executed depends on the scheduler in use.
Expand Down
4 changes: 2 additions & 2 deletions Sources/Signal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ extension Signal {
}
}

public protocol SignalProtocol: class {
public protocol SignalProtocol: AnyObject {
/// The type of values being sent by `self`.
associatedtype Value

Expand Down Expand Up @@ -1662,7 +1662,7 @@ private enum ThrottleWhileState<Value> {
}
}

private protocol SignalAggregateStrategy: class {
private protocol SignalAggregateStrategy: AnyObject {
/// Update the latest value of the signal at `position` to be `value`.
///
/// - parameters:
Expand Down