Skip to content

Commit 0f2ee49

Browse files
committed
Fix formatting: ./x.py fmt
1 parent c103c28 commit 0f2ee49

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

src/libcore/str/mod.rs

+5-15
Original file line numberDiff line numberDiff line change
@@ -3829,9 +3829,7 @@ impl str {
38293829
j = b;
38303830
}
38313831
// SAFETY: `Searcher` is known to return valid indices.
3832-
unsafe {
3833-
self.get_unchecked(i..j)
3834-
}
3832+
unsafe { self.get_unchecked(i..j) }
38353833
}
38363834

38373835
/// Returns a string slice with all prefixes that match a pattern
@@ -3868,9 +3866,7 @@ impl str {
38683866
i = a;
38693867
}
38703868
// SAFETY: `Searcher` is known to return valid indices.
3871-
unsafe {
3872-
self.get_unchecked(i..self.len())
3873-
}
3869+
unsafe { self.get_unchecked(i..self.len()) }
38743870
}
38753871

38763872
/// Returns a string slice with the prefix removed.
@@ -3902,9 +3898,7 @@ impl str {
39023898
must include the first character"
39033899
);
39043900
// SAFETY: `Searcher` is known to return valid indices.
3905-
unsafe {
3906-
Some(self.get_unchecked(len..))
3907-
}
3901+
unsafe { Some(self.get_unchecked(len..)) }
39083902
} else {
39093903
None
39103904
}
@@ -3943,9 +3937,7 @@ impl str {
39433937
must include the last character"
39443938
);
39453939
// SAFETY: `Searcher` is known to return valid indices.
3946-
unsafe {
3947-
Some(self.get_unchecked(..start))
3948-
}
3940+
unsafe { Some(self.get_unchecked(..start)) }
39493941
} else {
39503942
None
39513943
}
@@ -3994,9 +3986,7 @@ impl str {
39943986
j = b;
39953987
}
39963988
// SAFETY: `Searcher` is known to return valid indices.
3997-
unsafe {
3998-
self.get_unchecked(0..j)
3999-
}
3989+
unsafe { self.get_unchecked(0..j) }
40003990
}
40013991

40023992
/// Returns a string slice with all prefixes that match a pattern

0 commit comments

Comments
 (0)