Skip to content

Commit 99e141c

Browse files
committed
add more inline
1 parent 3d33877 commit 99e141c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

library/core/src/slice/memchr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const fn memchr_naive(x: u8, text: &[u8]) -> Option<usize> {
4848
}
4949

5050
#[rustc_allow_const_fn_unstable(const_eval_select)] // fallback impl has same behavior
51+
#[inline]
5152
const fn memchr_aligned(x: u8, text: &[u8]) -> Option<usize> {
5253
// The runtime version behaves the same as the compiletime version, it's
5354
// just more optimized.

library/core/src/str/iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ impl<'a, P: Pattern> SplitInternal<'a, P> {
656656
None
657657
}
658658

659-
#[inline]
659+
#[inline(always)]
660660
fn next(&mut self) -> Option<&'a str> {
661661
if self.finished {
662662
return None;

0 commit comments

Comments
 (0)