diff options
| author | Ulrik Sverdrup <bluss@users.noreply.github.com> | 2015-07-04 15:20:34 +0200 |
|---|---|---|
| committer | Ulrik Sverdrup <bluss@users.noreply.github.com> | 2015-07-04 15:20:34 +0200 |
| commit | c5a0a73253dd5cbd1bde8b05b15b3e644ad2b37a (patch) | |
| tree | b2f953fda966764a868686426b83672eb4628e45 | |
| parent | 0da69969d1fc8d375867ff07dfcefa2c4a2e7724 (diff) | |
| download | rust-c5a0a73253dd5cbd1bde8b05b15b3e644ad2b37a.tar.gz rust-c5a0a73253dd5cbd1bde8b05b15b3e644ad2b37a.zip | |
str: Correct documentation on is_char_boundary
Documentation claims it panics on out of bounds -- it regards out of bounds as just not a char boundary. core::str module is aware of how it works and uses it appropriately. Maybe we should rename it to `is_valid_index`, `is_slicable_index`, or something similar.
| -rw-r--r-- | src/libcollections/str.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 6be46855fe6..7e72ad1569a 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -483,9 +483,7 @@ impl str { /// considered to be /// boundaries. /// - /// # Panics - /// - /// Panics if `index` is greater than `self.len()`. + /// Returns `false` if `index` is greater than `self.len()`. /// /// # Examples /// |
