$ cargo run Compiling collections v0.1.0 (file:///projects/collections) error[E0277]: the type `str` cannot be indexed by `{integer}` --> src/main.rs:3:16 | 3 | let h = s1[0]; | ^ string indices are ranges of `usize` | = help: the trait `SliceIndex` is not implemented for `{integer}` = note: you can use `.chars().nth()` or `.bytes().nth()` for more information, see chapter 8 in The Book: = help: the following other types implement trait `SliceIndex`: `usize` implements `SliceIndex` `usize` implements `SliceIndex<[T]>` = note: required for `String` to implement `Index<{integer}>` For more information about this error, try `rustc --explain E0277`. error: could not compile `collections` (bin "collections") due to 1 previous error