mirror of
https://github.com/apple/swift-collections
synced 2026-11-29 05:14:20 +00:00
Merge branch 'release/1.0' into release/1.1
# Conflicts: # Tests/_CollectionsTestSupport/MinimalTypes/MinimalDecoder.swift
This commit is contained in:
4 files changed
+11
-5
No files matched your search
@@ -19,7 +19,7 @@
|
||||
|
||||
extern cpp_hash_fn custom_hash_fn;
|
||||
|
||||
struct custom_intptr_hash: public std::unary_function<intptr_t, std::size_t>
|
||||
struct custom_intptr_hash: public std::function<std::size_t(intptr_t)>
|
||||
{
|
||||
std::size_t
|
||||
operator()(intptr_t value) const
|
||||
|
||||
@@ -55,7 +55,7 @@ high-level set operations such as `union(_:)`, `intersection(_:)` or
|
||||
|
||||
```swift
|
||||
buildingMaterials.contains("glass") // false
|
||||
buildingMaterials.intersection(["brick", "straw"]) // ["straw", "brick"]
|
||||
buildingMaterials.intersection(["bricks", "straw"]) // ["straw", "bricks"]
|
||||
```
|
||||
|
||||
Operations that return an ordered set usually preserve the ordering of
|
||||
@@ -111,7 +111,7 @@ elements to the end of the collection.
|
||||
|
||||
```swift
|
||||
buildingMaterials.unordered.insert("glass") // => inserted: true
|
||||
// buildingMaterials is now ["straw", "sticks", "brick", "glass"]
|
||||
// buildingMaterials is now ["straw", "sticks", "bricks", "glass"]
|
||||
```
|
||||
|
||||
Accessing the unordered view is an efficient operation, with constant
|
||||
|
||||
@@ -53,7 +53,7 @@ import _CollectionsUtilities
|
||||
/// ``intersection(_:)-4o09a`` or ``isSubset(of:)-ptij``.
|
||||
///
|
||||
/// buildingMaterials.contains("glass") // false
|
||||
/// buildingMaterials.intersection(["brick", "straw"]) // ["straw", "brick"]
|
||||
/// buildingMaterials.intersection(["bricks", "straw"]) // ["straw", "bricks"]
|
||||
///
|
||||
/// Operations that return an ordered set usually preserve the ordering of
|
||||
/// elements in their input. For example, in the case of the `intersection` call
|
||||
@@ -103,7 +103,7 @@ import _CollectionsUtilities
|
||||
/// elements to the end of the collection.
|
||||
///
|
||||
/// buildingMaterials.unordered.insert("glass") // => inserted: true
|
||||
/// // buildingMaterials is now ["straw", "sticks", "brick", "glass"]
|
||||
/// // buildingMaterials is now ["straw", "sticks", "bricks", "glass"]
|
||||
///
|
||||
/// Accessing the unordered view is an efficient operation, with constant
|
||||
/// (minimal) overhead. Direct mutations of the unordered view (such as the
|
||||
|
||||
@@ -179,7 +179,13 @@ extension MinimalDecoder.KeyedContainer: KeyedDecodingContainerProtocol {
|
||||
return input[key.stringValue] != nil
|
||||
}
|
||||
|
||||
<<<<<<< HEAD:Tests/_CollectionsTestSupport/MinimalTypes/MinimalDecoder.swift
|
||||
func _decode<K: CodingKey>(key: K) throws -> Value {
|
||||
||||||| 4cab1c1c:Sources/_CollectionsTestSupport/MinimalTypes/MinimalDecoder.swift
|
||||
func _decode<Key: CodingKey>(key: Key) throws -> Value {
|
||||
=======
|
||||
func _decode<CKey: CodingKey>(key: CKey) throws -> Value {
|
||||
>>>>>>> release/1.0:Sources/_CollectionsTestSupport/MinimalTypes/MinimalDecoder.swift
|
||||
expectTrue(isValid, "Container isn't valid", trapping: true)
|
||||
commitPendingContainer()
|
||||
guard let value = input[key.stringValue] else {
|
||||
|
||||
Reference in new issue
Block a user