From 644d9a4b6d064bf8ce74a5c1ec90e36a9f75be08 Mon Sep 17 00:00:00 2001 From: Ben Rimmington Date: Fri, 6 Dec 2024 19:10:23 +0000 Subject: [PATCH] [SE-0453] Update `Vector` example and doc comment --- proposals/0453-vector.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proposals/0453-vector.md b/proposals/0453-vector.md index 17e5f7924d..a821384b1c 100644 --- a/proposals/0453-vector.md +++ b/proposals/0453-vector.md @@ -82,7 +82,7 @@ member it will be inline allocated on the heap with the rest of the properties. alone. ```swift -func complexAlgorithm() -> Int { +func complexAlgorithm() { // This is a stack allocation, no 'malloc's or reference counting here! let elements: Vector<4, Int> = [1, 2, 3, 4] @@ -276,7 +276,7 @@ extension Vector where Element: ~Copyable { /// Initializes every element in this vector by running the closure with the /// previously initialized element. /// - /// This will call the closure 'count' times, where 'count' is the static + /// This will call the closure `count - 1` times, where `count` is the static /// count of the vector, to initialize every element by passing the closure /// an immutable borrow reference to the previously initialized element. The /// closure is allowed to throw an error at any point during initialization at