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.
This commit is contained in:
Ulrik Sverdrup 2015-07-04 15:20:34 +02:00
parent 0da69969d1
commit c5a0a73253

View file

@ -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
///