about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Bernat <vincent@bernat.im>2015-08-09 00:56:38 +0200
committerVincent Bernat <vincent@bernat.im>2015-08-09 00:56:38 +0200
commitb67adbed5a3bb9820aeee8eef6d82ad20e028355 (patch)
treef44a0503876c6c8ff0e368020cd281b2dcf62019
parentcbf4c342cf9facb660df181c9c1d7d9a8934d5a1 (diff)
downloadrust-b67adbed5a3bb9820aeee8eef6d82ad20e028355.tar.gz
rust-b67adbed5a3bb9820aeee8eef6d82ad20e028355.zip
TRPL: minor correction on how `chars().nth()` work
The previous wording was confusing. While would we need to go through
the whole list just to find the first code point? `chars()` being an
iterator, we only need to walk from the beginning of the list.
-rw-r--r--src/doc/trpl/strings.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/trpl/strings.md b/src/doc/trpl/strings.md
index 7d5c43ea14c..aa1944a0993 100644
--- a/src/doc/trpl/strings.md
+++ b/src/doc/trpl/strings.md
@@ -115,7 +115,7 @@ You can get something similar to an index like this:
 let dog = hachiko.chars().nth(1); // kinda like hachiko[1]
 ```
 
-This emphasizes that we have to go through the whole list of `chars`.
+This emphasizes that we have to walk from the beginning of the list of `chars`.
 
 ## Slicing