Skip to content

Commit

Permalink
Fix typos in Vec<-->RustVec docs (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabbifish authored Feb 1, 2024
1 parent a8059a4 commit 9746f31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions book/src/built-in/vec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ fn make_rust_vec() -> Vec<u32> {
vec![5, 8, 11]
}
fn make_rust_vec_with_initial_contents(initial: &[16]) -> Vec<u16> {
intial.to_vec()
fn make_rust_vec_with_initial_contents(initial: &[u16]) -> Vec<u16> {
initial.to_vec()
}
```

Expand All @@ -53,7 +53,7 @@ func testMakeAVec () {
func testMakeAnotherVec () {
let initial: [Int16] = [3, 5, 7]
initial.withUnsafeBufferPointer({ initalPtr in
let vec: RustVec = get_vec_from_rust(initialPtr)
let vec: RustVec = make_rust_vec_with_initial_contents(initialPtr)

XCTAssertEqual(vec.len(), 3);

Expand Down

0 comments on commit 9746f31

Please sign in to comment.