Skip to content

Commit

Permalink
use ownership modifier (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
muukii authored Aug 24, 2023
1 parent 57a0517 commit e85b508
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Sources/Verge/Library/EventEmitter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ open class EventEmitter<Event>: EventEmitterType, @unchecked Sendable {
}

@_spi(EventEmitter)
public func accept(_ event: Event) {
public func accept(_ event: consuming Event) {

/**
https://github.com/VergeGroup/Verge/pull/220
Expand Down Expand Up @@ -126,8 +126,8 @@ open class EventEmitter<Event>: EventEmitterType, @unchecked Sendable {

}

open func receiveEvent(_ event: Event) {
open func receiveEvent(_ event: consuming Event) {

}

@_spi(EventEmitter)
Expand Down
4 changes: 2 additions & 2 deletions Sources/Verge/Library/VergeConcurrency.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public enum VergeConcurrency {

}

public final class UnfairLock: Sendable {
public struct UnfairLock: ~Copyable {
private let _lock: os_unfair_lock_t

public init() {
Expand Down Expand Up @@ -202,5 +202,5 @@ public enum VergeConcurrency {
}
}
}

}
4 changes: 2 additions & 2 deletions Sources/Verge/Store/Store.swift
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ open class Store<State: Equatable, Activity>: EventEmitter<_StoreEvent<State, Ac
}

@_spi(Internal)
public final override func receiveEvent(_ event: _StoreEvent<State, Activity>) {
public final override func receiveEvent(_ event: consuming _StoreEvent<State, Activity>) {

switch event {
case .state(let stateEvent):
switch stateEvent {
Expand Down

0 comments on commit e85b508

Please sign in to comment.