about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSOFe <sofe2038@gmail.com>2019-11-26 19:33:06 +0800
committerSOFe <sofe2038@gmail.com>2019-11-26 19:33:06 +0800
commit4718e20fcf32aa36f23e18ecf3c9ca479a6cce4c (patch)
tree7d32863e55a930c341fa1d6060bdf8fd9b509959
parent2e2e0dfc1acfb69be9575d320418d04f3caf64a7 (diff)
downloadrust-4718e20fcf32aa36f23e18ecf3c9ca479a6cce4c.tar.gz
rust-4718e20fcf32aa36f23e18ecf3c9ca479a6cce4c.zip
Fixed formatting issues
-rw-r--r--src/libcore/str/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index 4367cc54e70..f0c2fc97894 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -3814,7 +3814,8 @@ impl str {
     pub fn strip_prefix<'a, P: Pattern<'a>>(&'a self, prefix: P) -> Option<&'a str> {
         let mut matcher = prefix.into_searcher(self);
         if let SearchStep::Match(start, len) = matcher.next() {
-            debug_assert_eq!(start, 0, "The first search step from Searcher must start from the front");
+            debug_assert_eq!(start, 0, "The first search step from Searcher \
+                must include the first character");
             unsafe {
                 // Searcher is known to return valid indices.
                 Some(self.get_unchecked(len..))
@@ -3850,7 +3851,8 @@ impl str {
     {
         let mut matcher = suffix.into_searcher(self);
         if let SearchStep::Match(start, end) = matcher.next_back() {
-            debug_assert_eq!(end, self.len(), "The first search step from ReverseSearcher must include the last character");
+            debug_assert_eq!(end, self.len(), "The first search step from ReverseSearcher \
+                must include the last character");
             unsafe {
                 // Searcher is known to return valid indices.
                 Some(self.get_unchecked(..start))