Skip to content

Use Collections+DataProtocol and CocoaError extensions from swift-foundation #4956

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
May 14, 2024
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
61 changes: 0 additions & 61 deletions Sources/Foundation/Collections+DataProtocol.swift

This file was deleted.

59 changes: 0 additions & 59 deletions Sources/Foundation/NSError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -681,41 +681,6 @@ public extension CocoaError {
}

extension CocoaError {
public static var fileNoSuchFile: CocoaError.Code { return .fileNoSuchFile }
public static var fileLocking: CocoaError.Code { return .fileLocking }
public static var fileReadUnknown: CocoaError.Code { return .fileReadUnknown }
public static var fileReadNoPermission: CocoaError.Code { return .fileReadNoPermission }
public static var fileReadInvalidFileName: CocoaError.Code { return .fileReadInvalidFileName }
public static var fileReadCorruptFile: CocoaError.Code { return .fileReadCorruptFile }
public static var fileReadNoSuchFile: CocoaError.Code { return .fileReadNoSuchFile }
public static var fileReadInapplicableStringEncoding: CocoaError.Code { return .fileReadInapplicableStringEncoding }
public static var fileReadUnsupportedScheme: CocoaError.Code { return .fileReadUnsupportedScheme }
public static var fileReadTooLarge: CocoaError.Code { return .fileReadTooLarge }
public static var fileReadUnknownStringEncoding: CocoaError.Code { return .fileReadUnknownStringEncoding }
public static var fileWriteUnknown: CocoaError.Code { return .fileWriteUnknown }
public static var fileWriteNoPermission: CocoaError.Code { return .fileWriteNoPermission }
public static var fileWriteInvalidFileName: CocoaError.Code { return .fileWriteInvalidFileName }
public static var fileWriteFileExists: CocoaError.Code { return .fileWriteFileExists }
public static var fileWriteInapplicableStringEncoding: CocoaError.Code { return .fileWriteInapplicableStringEncoding }
public static var fileWriteUnsupportedScheme: CocoaError.Code { return .fileWriteUnsupportedScheme }
public static var fileWriteOutOfSpace: CocoaError.Code { return .fileWriteOutOfSpace }
public static var fileWriteVolumeReadOnly: CocoaError.Code { return .fileWriteVolumeReadOnly }
public static var fileManagerUnmountUnknown: CocoaError.Code { return .fileManagerUnmountUnknown }
public static var fileManagerUnmountBusy: CocoaError.Code { return .fileManagerUnmountBusy }
public static var keyValueValidation: CocoaError.Code { return .keyValueValidation }
public static var formatting: CocoaError.Code { return .formatting }
public static var userCancelled: CocoaError.Code { return .userCancelled }
public static var featureUnsupported: CocoaError.Code { return .featureUnsupported }
public static var executableNotLoadable: CocoaError.Code { return .executableNotLoadable }
public static var executableArchitectureMismatch: CocoaError.Code { return .executableArchitectureMismatch }
public static var executableRuntimeMismatch: CocoaError.Code { return .executableRuntimeMismatch }
public static var executableLoad: CocoaError.Code { return .executableLoad }
public static var executableLink: CocoaError.Code { return .executableLink }
public static var propertyListReadCorrupt: CocoaError.Code { return .propertyListReadCorrupt }
public static var propertyListReadUnknownVersion: CocoaError.Code { return .propertyListReadUnknownVersion }
public static var propertyListReadStream: CocoaError.Code { return .propertyListReadStream }
public static var propertyListWriteStream: CocoaError.Code { return .propertyListWriteStream }
public static var propertyListWriteInvalid: CocoaError.Code { return .propertyListWriteInvalid }
public static var xpcConnectionInterrupted: CocoaError.Code { return .xpcConnectionInterrupted }
public static var xpcConnectionInvalid: CocoaError.Code { return .xpcConnectionInvalid }
public static var xpcConnectionReplyInvalid: CocoaError.Code { return .xpcConnectionReplyInvalid }
Expand All @@ -732,26 +697,6 @@ extension CocoaError {
}

extension CocoaError {
public var isCoderError: Bool {
return code.rawValue >= 4864 && code.rawValue <= 4991
}

public var isExecutableError: Bool {
return code.rawValue >= 3584 && code.rawValue <= 3839
}

public var isFileError: Bool {
return code.rawValue >= 0 && code.rawValue <= 1023
}

public var isFormattingError: Bool {
return code.rawValue >= 2048 && code.rawValue <= 2559
}

public var isPropertyListError: Bool {
return code.rawValue >= 3840 && code.rawValue <= 4095
}

public var isUbiquitousFileError: Bool {
return code.rawValue >= 4352 && code.rawValue <= 4607
}
Expand All @@ -760,10 +705,6 @@ extension CocoaError {
return code.rawValue >= 4608 && code.rawValue <= 4863
}

public var isValidationError: Bool {
return code.rawValue >= 1024 && code.rawValue <= 2047
}

public var isXPCConnectionError: Bool {
return code.rawValue >= 4096 && code.rawValue <= 4224
}
Expand Down