Skip to content

Commit b3de1f3

Browse files
committed
Fix mismatched constant name in static func == doc
- I've found a mismatched constant name in `static func ==` example. - Given the context, it should be `numberToMatch`, not `numberToFind`.
1 parent c1534d5 commit b3de1f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/core/Optional.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,9 @@ extension Optional: Equatable where Wrapped: Equatable {
375375
/// `numberToMatch` constant is wrapped as an optional before comparing to the
376376
/// optional `numberFromString`:
377377
///
378-
/// let numberToFind: Int = 23
378+
/// let numberToMatch: Int = 23
379379
/// let numberFromString: Int? = Int("23") // Optional(23)
380-
/// if numberToFind == numberFromString {
380+
/// if numberToMatch == numberFromString {
381381
/// print("It's a match!")
382382
/// }
383383
/// // Prints "It's a match!"

0 commit comments

Comments
 (0)