From 5ff8c003b0a353ca5b49a8b1b557474b17fd5a2a Mon Sep 17 00:00:00 2001 From: ejmarchant Date: Mon, 16 Aug 2021 21:37:05 +0100 Subject: [PATCH] Fix documentation for types conforming to ExpressibleByArrayLiteral or ExpressibleByDictionaryLiteral (#82) # Conflicts: # Sources/PriorityQueueModule/Heap+ExpressibleByArrayLiteral.swift --- .../DequeModule/Deque+ExpressibleByArrayLiteral.swift | 6 +++--- ...eredDictionary+ExpressibleByDictionaryLiteral.swift | 9 +++------ .../OrderedSet+ExpressibleByArrayLiteral.swift | 10 +++++----- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Sources/DequeModule/Deque+ExpressibleByArrayLiteral.swift b/Sources/DequeModule/Deque+ExpressibleByArrayLiteral.swift index 54b6e917f..fd7125c90 100644 --- a/Sources/DequeModule/Deque+ExpressibleByArrayLiteral.swift +++ b/Sources/DequeModule/Deque+ExpressibleByArrayLiteral.swift @@ -13,12 +13,12 @@ extension Deque: ExpressibleByArrayLiteral { /// Creates a new deque from the contents of an array literal. /// /// Do not call this initializer directly. It is used by the compiler when - /// you use an array literal. Instead, create a new set using an array + /// you use an array literal. Instead, create a new deque using an array /// literal as its value by enclosing a comma-separated list of values in - /// square brackets. You can use an array literal anywhere a set is expected + /// square brackets. You can use an array literal anywhere a deque is expected /// by the type context. /// - /// - Parameter elements: A variadic list of elements of the new set. + /// - Parameter elements: A variadic list of elements of the new deque. @inlinable @inline(__always) public init(arrayLiteral elements: Element...) { diff --git a/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+ExpressibleByDictionaryLiteral.swift b/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+ExpressibleByDictionaryLiteral.swift index 91f116004..8c1ed0396 100644 --- a/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+ExpressibleByDictionaryLiteral.swift +++ b/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+ExpressibleByDictionaryLiteral.swift @@ -13,17 +13,14 @@ extension OrderedDictionary: ExpressibleByDictionaryLiteral { /// Creates a new ordered dictionary from the contents of a dictionary /// literal. /// - /// Duplicate elements in the literal are allowed, but the resulting - /// set will only contain the first occurrence of each. - /// /// Do not call this initializer directly. It is used by the compiler when you /// use a dictionary literal. Instead, create a new ordered dictionary using a /// dictionary literal as its value by enclosing a comma-separated list of - /// values in square brackets. You can use an array literal anywhere a set is - /// expected by the type context. + /// key-value pairs in square brackets. You can use a dictionary literal + /// anywhere an ordered dictionary is expected by the type context. /// /// - Parameter elements: A variadic list of key-value pairs for the new - /// dictionary. + /// ordered dictionary. /// /// - Complexity: O(`elements.count`) if `Key` implements /// high-quality hashing. diff --git a/Sources/OrderedCollections/OrderedSet/OrderedSet+ExpressibleByArrayLiteral.swift b/Sources/OrderedCollections/OrderedSet/OrderedSet+ExpressibleByArrayLiteral.swift index 1b92f341f..1d1d6dece 100644 --- a/Sources/OrderedCollections/OrderedSet/OrderedSet+ExpressibleByArrayLiteral.swift +++ b/Sources/OrderedCollections/OrderedSet/OrderedSet+ExpressibleByArrayLiteral.swift @@ -12,16 +12,16 @@ extension OrderedSet: ExpressibleByArrayLiteral { /// Creates a new ordered set from the contents of an array literal. /// - /// Duplicate elements in the literal are allowed, but the resulting + /// Duplicate elements in the literal are allowed, but the resulting ordered /// set will only contain the first occurrence of each. /// /// Do not call this initializer directly. It is used by the compiler when - /// you use an array literal. Instead, create a new set using an array + /// you use an array literal. Instead, create a new ordered set using an array /// literal as its value by enclosing a comma-separated list of values in - /// square brackets. You can use an array literal anywhere a set is expected - /// by the type context. + /// square brackets. You can use an array literal anywhere an ordered set is + /// expected by the type context. /// - /// - Parameter elements: A variadic list of elements of the new set. + /// - Parameter elements: A variadic list of elements of the new ordered set. /// /// - Complexity: O(`elements.count`) if `Element` implements /// high-quality hashing.