about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrik Sverdrup <bluss@users.noreply.github.com>2016-01-20 17:59:32 +0100
committerUlrik Sverdrup <bluss@users.noreply.github.com>2016-01-20 18:00:34 +0100
commit078a6231a78a974eb19df884630edb8c65909941 (patch)
tree8ea37e57d0d2927829f23cb5de216422f6619c6d
parent9d21acaf9b41ea2529b15d5efd06266e924c0496 (diff)
downloadrust-078a6231a78a974eb19df884630edb8c65909941.tar.gz
rust-078a6231a78a974eb19df884630edb8c65909941.zip
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).
-rw-r--r--src/libstd/memchr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/memchr.rs b/src/libstd/memchr.rs
index c043b41ed21..27702e2e59a 100644
--- a/src/libstd/memchr.rs
+++ b/src/libstd/memchr.rs
@@ -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)