Auto merge of #31057 - bluss:memrchr-fallback, r=alexcrichton
Use the fallback impl for memrchr on non-linux The memrchr code was never used(!). This brings the memrchr improvements to non-linux platforms (LineWriter / buffered stdout benefits). Previous PR #30381
This commit is contained in:
commit
038de0f95e
@ -98,7 +98,7 @@ pub fn memrchr(needle: u8, haystack: &[u8]) -> Option<usize> {
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
|
||||
haystack.iter().rposition(|&b| b == needle)
|
||||
fallback::memrchr(needle, haystack)
|
||||
}
|
||||
|
||||
memrchr_specific(needle, haystack)
|
||||
|
Loading…
x
Reference in New Issue
Block a user