From c5a0a73253dd5cbd1bde8b05b15b3e644ad2b37a Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Sat, 4 Jul 2015 15:20:34 +0200 Subject: [PATCH] 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. --- src/libcollections/str.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 6be46855fe60..7e72ad1569a1 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 ///