diff options
| author | Phoebe Bell <minaphoebebell@gmail.com> | 2020-01-16 18:50:53 -0800 |
|---|---|---|
| committer | Phoebe Bell <minaphoebebell@gmail.com> | 2020-01-16 18:50:53 -0800 |
| commit | 0f2ee495e9a9d677466ce0c1827ba20919a5ca1f (patch) | |
| tree | b45703e702be6ce1838df196da0c8c8b4b623a04 | |
| parent | c103c284b93039149f0ec2a4f3d20ca89f34c0ad (diff) | |
Fix formatting: ./x.py fmt
| -rw-r--r-- | src/libcore/str/mod.rs | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 3bfeee87cc0..5a7cddd4041 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -3829,9 +3829,7 @@ impl str { j = b; } // SAFETY: `Searcher` is known to return valid indices. - unsafe { - self.get_unchecked(i..j) - } + unsafe { self.get_unchecked(i..j) } } /// Returns a string slice with all prefixes that match a pattern @@ -3868,9 +3866,7 @@ impl str { i = a; } // SAFETY: `Searcher` is known to return valid indices. - unsafe { - self.get_unchecked(i..self.len()) - } + unsafe { self.get_unchecked(i..self.len()) } } /// Returns a string slice with the prefix removed. @@ -3902,9 +3898,7 @@ impl str { must include the first character" ); // SAFETY: `Searcher` is known to return valid indices. - unsafe { - Some(self.get_unchecked(len..)) - } + unsafe { Some(self.get_unchecked(len..)) } } else { None } @@ -3943,9 +3937,7 @@ impl str { must include the last character" ); // SAFETY: `Searcher` is known to return valid indices. - unsafe { - Some(self.get_unchecked(..start)) - } + unsafe { Some(self.get_unchecked(..start)) } } else { None } @@ -3994,9 +3986,7 @@ impl str { j = b; } // SAFETY: `Searcher` is known to return valid indices. - unsafe { - self.get_unchecked(0..j) - } + unsafe { self.get_unchecked(0..j) } } /// Returns a string slice with all prefixes that match a pattern |
