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:
bors 2016-01-21 13:31:43 +00:00
commit 038de0f95e

View File

@ -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)