1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-10 00:44:21 +02:00

Simplify language in speaker notes

This commit is contained in:
Martin Geisler 2023-01-12 17:13:46 +01:00 committed by GitHub
parent d85643d5ac
commit 67b65c5ee8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ fn main() {
* The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are equal.
* We set `s` as a reference of `i32`s. Notice that the type of `s` no longer has an array length. This avoids type errors when performing computations on slices of different sizes.
* `s` is a reference to a slice of `i32`s. Notice that the type of `s` no longer mentions the array length. This allows us to performing computations on slices of different sizes.
* Slices always borrow from another object. In this example, `a` has to remain 'alive' so we can take a slice from it.