Skip to content

Commit 5ff8c00

Browse files
ejmarchantlorentey
authored andcommitted
Fix documentation for types conforming to ExpressibleByArrayLiteral or ExpressibleByDictionaryLiteral (apple#82)
# Conflicts: # Sources/PriorityQueueModule/Heap+ExpressibleByArrayLiteral.swift
1 parent 85a2070 commit 5ff8c00

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

Sources/DequeModule/Deque+ExpressibleByArrayLiteral.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ extension Deque: ExpressibleByArrayLiteral {
1313
/// Creates a new deque from the contents of an array literal.
1414
///
1515
/// Do not call this initializer directly. It is used by the compiler when
16-
/// you use an array literal. Instead, create a new set using an array
16+
/// you use an array literal. Instead, create a new deque using an array
1717
/// literal as its value by enclosing a comma-separated list of values in
18-
/// square brackets. You can use an array literal anywhere a set is expected
18+
/// square brackets. You can use an array literal anywhere a deque is expected
1919
/// by the type context.
2020
///
21-
/// - Parameter elements: A variadic list of elements of the new set.
21+
/// - Parameter elements: A variadic list of elements of the new deque.
2222
@inlinable
2323
@inline(__always)
2424
public init(arrayLiteral elements: Element...) {

Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+ExpressibleByDictionaryLiteral.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,14 @@ extension OrderedDictionary: ExpressibleByDictionaryLiteral {
1313
/// Creates a new ordered dictionary from the contents of a dictionary
1414
/// literal.
1515
///
16-
/// Duplicate elements in the literal are allowed, but the resulting
17-
/// set will only contain the first occurrence of each.
18-
///
1916
/// Do not call this initializer directly. It is used by the compiler when you
2017
/// use a dictionary literal. Instead, create a new ordered dictionary using a
2118
/// dictionary literal as its value by enclosing a comma-separated list of
22-
/// values in square brackets. You can use an array literal anywhere a set is
23-
/// expected by the type context.
19+
/// key-value pairs in square brackets. You can use a dictionary literal
20+
/// anywhere an ordered dictionary is expected by the type context.
2421
///
2522
/// - Parameter elements: A variadic list of key-value pairs for the new
26-
/// dictionary.
23+
/// ordered dictionary.
2724
///
2825
/// - Complexity: O(`elements.count`) if `Key` implements
2926
/// high-quality hashing.

Sources/OrderedCollections/OrderedSet/OrderedSet+ExpressibleByArrayLiteral.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
extension OrderedSet: ExpressibleByArrayLiteral {
1313
/// Creates a new ordered set from the contents of an array literal.
1414
///
15-
/// Duplicate elements in the literal are allowed, but the resulting
15+
/// Duplicate elements in the literal are allowed, but the resulting ordered
1616
/// set will only contain the first occurrence of each.
1717
///
1818
/// Do not call this initializer directly. It is used by the compiler when
19-
/// you use an array literal. Instead, create a new set using an array
19+
/// you use an array literal. Instead, create a new ordered set using an array
2020
/// literal as its value by enclosing a comma-separated list of values in
21-
/// square brackets. You can use an array literal anywhere a set is expected
22-
/// by the type context.
21+
/// square brackets. You can use an array literal anywhere an ordered set is
22+
/// expected by the type context.
2323
///
24-
/// - Parameter elements: A variadic list of elements of the new set.
24+
/// - Parameter elements: A variadic list of elements of the new ordered set.
2525
///
2626
/// - Complexity: O(`elements.count`) if `Element` implements
2727
/// high-quality hashing.

0 commit comments

Comments
 (0)