From bf742617f30870372ed235c6ccf4515ea0a204d3 Mon Sep 17 00:00:00 2001 From: Karoy Lorentey Date: Mon, 2 Oct 2023 21:09:11 -0700 Subject: [PATCH 1/4] [test] Fix typename shadowing warning in Swift 5.9 --- .../_CollectionsTestSupport/MinimalTypes/MinimalDecoder.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/_CollectionsTestSupport/MinimalTypes/MinimalDecoder.swift b/Sources/_CollectionsTestSupport/MinimalTypes/MinimalDecoder.swift index 11b7aa31..dd1a01b8 100644 --- a/Sources/_CollectionsTestSupport/MinimalTypes/MinimalDecoder.swift +++ b/Sources/_CollectionsTestSupport/MinimalTypes/MinimalDecoder.swift @@ -179,7 +179,7 @@ extension MinimalDecoder.KeyedContainer: KeyedDecodingContainerProtocol { return input[key.stringValue] != nil } - func _decode(key: Key) throws -> Value { + func _decode(key: CKey) throws -> Value { expectTrue(isValid, "Container isn't valid", trapping: true) commitPendingContainer() guard let value = input[key.stringValue] else { From 9efa05c583441159bd505dfde340cf774d6144e0 Mon Sep 17 00:00:00 2001 From: Karoy Lorentey Date: Mon, 2 Oct 2023 21:10:12 -0700 Subject: [PATCH 2/4] [benchmark] Update std::function syntax for current C++ --- Benchmarks/CppBenchmarks/src/CustomHash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Benchmarks/CppBenchmarks/src/CustomHash.h b/Benchmarks/CppBenchmarks/src/CustomHash.h index c8ba3597..f99beb61 100644 --- a/Benchmarks/CppBenchmarks/src/CustomHash.h +++ b/Benchmarks/CppBenchmarks/src/CustomHash.h @@ -19,7 +19,7 @@ extern cpp_hash_fn custom_hash_fn; -struct custom_intptr_hash: public std::unary_function +struct custom_intptr_hash: public std::function { std::size_t operator()(intptr_t value) const From 5193e405bd153a42f2abca3552ca05ded81b2ec8 Mon Sep 17 00:00:00 2001 From: kati-kms Date: Thu, 26 Oct 2023 00:40:40 +0900 Subject: [PATCH 3/4] Fix typos: OrderedSet.md Documentation --- Documentation/OrderedSet.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/OrderedSet.md b/Documentation/OrderedSet.md index 9786a66e..9d1285d0 100644 --- a/Documentation/OrderedSet.md +++ b/Documentation/OrderedSet.md @@ -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 From b72a6cfd9384bc3ace8ea2412e79d5ec34c24934 Mon Sep 17 00:00:00 2001 From: kati-kms Date: Thu, 26 Oct 2023 02:14:51 +0900 Subject: [PATCH 4/4] Fix typos: OrderedSet.swift DocC --- Sources/OrderedCollections/OrderedSet/OrderedSet.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/OrderedCollections/OrderedSet/OrderedSet.swift b/Sources/OrderedCollections/OrderedSet/OrderedSet.swift index 5f0fbf70..2d8d3009 100644 --- a/Sources/OrderedCollections/OrderedSet/OrderedSet.swift +++ b/Sources/OrderedCollections/OrderedSet/OrderedSet.swift @@ -49,7 +49,7 @@ /// ``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 @@ -99,7 +99,7 @@ /// 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