mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Replaced the majority of ' : ' with ': '.
This commit is contained in:
@@ -12,10 +12,10 @@
|
||||
|
||||
public protocol _UnicodeEncoding {
|
||||
/// The basic unit of encoding
|
||||
associatedtype CodeUnit : UnsignedInteger, FixedWidthInteger
|
||||
associatedtype CodeUnit: UnsignedInteger, FixedWidthInteger
|
||||
|
||||
/// A valid scalar value as represented in this encoding
|
||||
associatedtype EncodedScalar : BidirectionalCollection
|
||||
associatedtype EncodedScalar: BidirectionalCollection
|
||||
where EncodedScalar.Iterator.Element == CodeUnit
|
||||
|
||||
/// A unicode scalar value to be used when repairing
|
||||
@@ -23,7 +23,7 @@ public protocol _UnicodeEncoding {
|
||||
///
|
||||
/// If the Unicode replacement character U+FFFD is representable in this
|
||||
/// encoding, `encodedReplacementCharacter` encodes that scalar value.
|
||||
static var encodedReplacementCharacter : EncodedScalar { get }
|
||||
static var encodedReplacementCharacter: EncodedScalar { get }
|
||||
|
||||
/// Converts from encoded to encoding-independent representation
|
||||
static func decode(_ content: EncodedScalar) -> Unicode.Scalar
|
||||
@@ -37,18 +37,18 @@ public protocol _UnicodeEncoding {
|
||||
///
|
||||
/// A default implementation of this method will be provided
|
||||
/// automatically for any conforming type that does not implement one.
|
||||
static func transcode<FromEncoding : Unicode.Encoding>(
|
||||
static func transcode<FromEncoding: Unicode.Encoding>(
|
||||
_ content: FromEncoding.EncodedScalar, from _: FromEncoding.Type
|
||||
) -> EncodedScalar?
|
||||
|
||||
/// A type that can be used to parse `CodeUnits` into
|
||||
/// `EncodedScalar`s.
|
||||
associatedtype ForwardParser : Unicode.Parser
|
||||
associatedtype ForwardParser: Unicode.Parser
|
||||
where ForwardParser.Encoding == Self
|
||||
|
||||
/// A type that can be used to parse a reversed sequence of
|
||||
/// `CodeUnits` into `EncodedScalar`s.
|
||||
associatedtype ReverseParser : Unicode.Parser
|
||||
associatedtype ReverseParser: Unicode.Parser
|
||||
where ReverseParser.Encoding == Self
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
@@ -66,7 +66,7 @@ extension _UnicodeEncoding {
|
||||
public static func _isScalar(_ x: CodeUnit) -> Bool { return false }
|
||||
|
||||
@inlinable
|
||||
public static func transcode<FromEncoding : Unicode.Encoding>(
|
||||
public static func transcode<FromEncoding: Unicode.Encoding>(
|
||||
_ content: FromEncoding.EncodedScalar, from _: FromEncoding.Type
|
||||
) -> EncodedScalar? {
|
||||
return encode(FromEncoding.decode(content))
|
||||
@@ -84,7 +84,7 @@ extension _UnicodeEncoding {
|
||||
/// `encodedReplacementCharacter` if the scalar can't be represented in this
|
||||
/// encoding.
|
||||
@inlinable
|
||||
internal static func _transcode<FromEncoding : Unicode.Encoding>(
|
||||
internal static func _transcode<FromEncoding: Unicode.Encoding>(
|
||||
_ content: FromEncoding.EncodedScalar, from _: FromEncoding.Type
|
||||
) -> EncodedScalar {
|
||||
return transcode(content, from: FromEncoding.self)
|
||||
|
||||
Reference in New Issue
Block a user