mirror of
https://github.com/apple/swift-collections
synced 2026-11-28 05:04:21 +00:00
Add support for embedded Swift mode
Remove calls to `debugPrint` (which does not exist), and ifdef out support for `Codable` and `Reflection`.
This commit is contained in:
48 files changed
+106
-1
No files matched your search
@@ -11,6 +11,7 @@
|
||||
|
||||
import InternalCollectionsUtilities
|
||||
|
||||
#if !$Embedded
|
||||
extension BitArray: Codable {
|
||||
/// Encodes this bit array into the given encoder.
|
||||
///
|
||||
@@ -73,3 +74,4 @@ extension BitArray: Codable {
|
||||
self.init(_storage: words, count: count)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -9,9 +9,11 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#if !$Embedded
|
||||
extension BitArray: CustomReflectable {
|
||||
/// The custom mirror for this instance.
|
||||
public var customMirror: Mirror {
|
||||
Mirror(self, unlabeledChildren: self, displayStyle: .collection)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -23,6 +23,7 @@ extension UInt8 {
|
||||
internal static var _asciiGT: Self { 62 }
|
||||
}
|
||||
|
||||
#if !$Embedded
|
||||
extension BitArray: CustomStringConvertible {
|
||||
/// A textual representation of this instance.
|
||||
/// Bit arrays print themselves as a string of binary bits, with the
|
||||
@@ -55,6 +56,7 @@ extension BitArray: CustomDebugStringConvertible {
|
||||
description
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
extension BitArray {
|
||||
internal var _bitString: String {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#if !$Embedded
|
||||
extension BitArray: ExpressibleByStringLiteral {
|
||||
/// Creates an instance initialized with the given elements.
|
||||
@inlinable
|
||||
@@ -19,3 +20,4 @@ extension BitArray: ExpressibleByStringLiteral {
|
||||
self = bits
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -9,6 +9,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#if !$Embedded
|
||||
extension BitArray: LosslessStringConvertible {
|
||||
/// Initializes a new bit array from a string representation.
|
||||
///
|
||||
@@ -62,3 +63,4 @@ extension BitArray: LosslessStringConvertible {
|
||||
guard success else { return nil }
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user