std: Use the fallback impl for memrchr on non-linux

This code was never used(!). This brings the memrchr improvements to
non-linux platforms (LineWriter / buffered stdout benefits).
This commit is contained in:
Ulrik Sverdrup 2016-01-20 17:59:32 +01:00
parent 9d21acaf9b
commit 078a6231a7

View File

@ -98,7 +98,7 @@ fn memrchr_specific(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)