Skip to content

Fix redundant access-level modifiers. #390

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

Merged
merged 1 commit into from
Sep 4, 2018
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
4 changes: 2 additions & 2 deletions src/swift/Dispatch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public enum DispatchTimeoutResult {

/// dispatch_group

public extension DispatchGroup {
extension DispatchGroup {
public func notify(qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], queue: DispatchQueue, execute work: @escaping @convention(block) () -> ()) {
if #available(macOS 10.10, iOS 8.0, *), qos != .unspecified || !flags.isEmpty {
let item = DispatchWorkItem(qos: qos, flags: flags, block: work)
Expand Down Expand Up @@ -163,7 +163,7 @@ public extension DispatchGroup {

/// dispatch_semaphore

public extension DispatchSemaphore {
extension DispatchSemaphore {
@discardableResult
public func signal() -> Int {
return Int(dispatch_semaphore_signal(self.__wrapped))
Expand Down
2 changes: 1 addition & 1 deletion src/swift/IO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import CDispatch

public extension DispatchIO {
extension DispatchIO {

public enum StreamType : UInt {
case stream = 0
Expand Down
2 changes: 1 addition & 1 deletion src/swift/Queue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ internal class _DispatchSpecificValue<T> {
internal init(value: T) { self.value = value }
}

public extension DispatchQueue {
extension DispatchQueue {
public struct Attributes : OptionSet {
public let rawValue: UInt64
public init(rawValue: UInt64) { self.rawValue = rawValue }
Expand Down
22 changes: 11 additions & 11 deletions src/swift/Source.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import CDispatch
import _SwiftDispatchOverlayShims

public extension DispatchSourceProtocol {
extension DispatchSourceProtocol {

public func setEventHandler(qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], handler: DispatchSourceHandler?) {
if #available(macOS 10.10, iOS 8.0, *), let h = handler, qos != .unspecified || !flags.isEmpty {
Expand Down Expand Up @@ -91,7 +91,7 @@ public extension DispatchSourceProtocol {
}
}

public extension DispatchSource {
extension DispatchSource {
#if HAVE_MACH
public struct MachSendEvent : OptionSet, RawRepresentable {
public let rawValue: UInt
Expand Down Expand Up @@ -222,7 +222,7 @@ public extension DispatchSource {
}

#if HAVE_MACH
public extension DispatchSourceMachSend {
extension DispatchSourceMachSend {
public var handle: mach_port_t {
return mach_port_t(dispatch_source_get_handle(self as! DispatchSource))
}
Expand All @@ -240,15 +240,15 @@ public extension DispatchSourceMachSend {
#endif

#if HAVE_MACH
public extension DispatchSourceMachReceive {
extension DispatchSourceMachReceive {
public var handle: mach_port_t {
return mach_port_t(dispatch_source_get_handle(self as! DispatchSource))
}
}
#endif

#if HAVE_MACH
public extension DispatchSourceMemoryPressure {
extension DispatchSourceMemoryPressure {
public var data: DispatchSource.MemoryPressureEvent {
let data = dispatch_source_get_data(self as! DispatchSource)
return DispatchSource.MemoryPressureEvent(rawValue: data)
Expand All @@ -262,7 +262,7 @@ public extension DispatchSourceMemoryPressure {
#endif

#if !os(Linux) && !os(Android)
public extension DispatchSourceProcess {
extension DispatchSourceProcess {
public var handle: pid_t {
return pid_t(dispatch_source_get_handle(self as! DispatchSource))
}
Expand All @@ -277,7 +277,7 @@ public extension DispatchSourceProcess {
}
#endif

public extension DispatchSourceTimer {
extension DispatchSourceTimer {
///
/// Sets the deadline and leeway for a timer event that fires once.
///
Expand Down Expand Up @@ -618,7 +618,7 @@ public extension DispatchSourceTimer {
}

#if !os(Linux) && !os(Android)
public extension DispatchSourceFileSystemObject {
extension DispatchSourceFileSystemObject {
public var handle: Int32 {
return Int32(dispatch_source_get_handle((self as! DispatchSource).__wrapped))
}
Expand All @@ -635,7 +635,7 @@ public extension DispatchSourceFileSystemObject {
}
#endif

public extension DispatchSourceUserDataAdd {
extension DispatchSourceUserDataAdd {
/// Merges data into a dispatch source of type `DISPATCH_SOURCE_TYPE_DATA_ADD`
/// and submits its event handler block to its target queue.
///
Expand All @@ -646,7 +646,7 @@ public extension DispatchSourceUserDataAdd {
}
}

public extension DispatchSourceUserDataOr {
extension DispatchSourceUserDataOr {
/// Merges data into a dispatch source of type `DISPATCH_SOURCE_TYPE_DATA_OR` and
/// submits its event handler block to its target queue.
///
Expand All @@ -657,7 +657,7 @@ public extension DispatchSourceUserDataOr {
}
}

public extension DispatchSourceUserDataReplace {
extension DispatchSourceUserDataReplace {
/// Merges data into a dispatch source of type `DISPATCH_SOURCE_TYPE_DATA_REPLACE`
/// and submits its event handler block to its target queue.
///
Expand Down