Skip to content

Commit 6ad03e2

Browse files
authored
Merge pull request #3780 from radex/patch-1
Fixes typos in OptimizationTips.rst
2 parents 9709b0e + d1106c0 commit 6ad03e2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/OptimizationTips.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ generics. Some more examples of generics:
319319

320320
func myAlgorithm(_ a: [T], length: Int) { ... }
321321

322-
// The compiler can specialize code of MyStack[Int]
323-
var stackOfInts: MyStack[Int]
322+
// The compiler can specialize code of MyStack<Int>
323+
var stackOfInts: MyStack<Int>
324324
// Use stack of ints.
325325
for i in ... {
326326
stack.push(...)
@@ -522,15 +522,15 @@ count operations are expensive and unavoidable when using Swift classes.
522522
Advice: Use unmanaged references to avoid reference counting overhead
523523
---------------------------------------------------------------------
524524

525-
Note, ``Unmanaged<T>._withUnsafeGuaranteedRef`` is not public api and will go
525+
Note, ``Unmanaged<T>._withUnsafeGuaranteedRef`` is not a public API and will go
526526
away in the future. Therefore, don't use it in code that you can not change in
527527
the future.
528528

529529
In performance-critical code you can choose to use unmanaged references. The
530530
``Unmanaged<T>`` structure allows developers to disable automatic reference
531531
counting for a specific reference.
532532

533-
When you do this you need to make sure that there exists another reference to
533+
When you do this, you need to make sure that there exists another reference to
534534
instance held by the ``Unmanaged`` struct instance for the duration of the use
535535
of ``Unmanaged`` (see `Unmanaged.swift`_ for more details) that keeps the instance
536536
alive.

0 commit comments

Comments
 (0)