]> git.lizzy.rs Git - rust.git/blobdiff - src/libcollections/string.rs
Fix remaining documentation to reflect fail!() -> panic!()
[rust.git] / src / libcollections / string.rs
index cb9faf31a5fd8935cbe0937c17e2af7f71441d6c..5872afc6fde5fe5c8c244d2abaef2f0ab14f46cc 100644 (file)
@@ -498,9 +498,9 @@ pub fn as_bytes<'a>(&'a self) -> &'a [u8] {
 
     /// Shortens a string to the specified length.
     ///
-    /// # Failure
+    /// # Panics
     ///
-    /// Fails if `new_len` > current length,
+    /// Panics if `new_len` > current length,
     /// or if `new_len` is not a character boundary.
     ///
     /// # Example