Skip to content

Commit

Permalink
std: Use the fallback impl for memrchr on non-linux
Browse files Browse the repository at this point in the history
This code was never used(!). This brings the memrchr improvements to
non-linux platforms (LineWriter / buffered stdout benefits).
  • Loading branch information
bluss committed Jan 20, 2016
1 parent 9d21aca commit 078a623
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/memchr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 078a623

Please sign in to comment.