Skip to content

Commit fc35aca

Browse files
author
Dave Abrahams
committed
[stdlib] Every UnicodeCodec is a UnicodeEncoding
1 parent e08fd9a commit fc35aca

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

stdlib/public/core/Unicode.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public enum UnicodeDecodingResult : Equatable {
6161
/// decoded Unicode scalar values.
6262
///
6363
/// - SeeAlso: `UTF8`, `UTF16`, `UTF32`, `UnicodeScalar`
64-
public protocol UnicodeCodec {
64+
public protocol UnicodeCodec : UnicodeEncoding {
6565

6666
/// A type that can hold code unit values for this encoding.
6767
associatedtype CodeUnit
@@ -968,12 +968,6 @@ extension UnicodeCodec where CodeUnit : UnsignedInteger {
968968
}
969969
}
970970

971-
extension UnicodeCodec {
972-
public static func _nullCodeUnitOffset(in input: UnsafePointer<CodeUnit>) -> Int {
973-
fatalError("_nullCodeUnitOffset(in:) implementation should be provided")
974-
}
975-
}
976-
977971
@available(*, unavailable, renamed: "UnicodeCodec")
978972
public typealias UnicodeCodecType = UnicodeCodec
979973

0 commit comments

Comments
 (0)