diff options
| author | Brian Anderson <banderson@mozilla.com> | 2016-09-22 00:10:37 +0000 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2016-10-01 19:33:02 +0000 |
| commit | fea1bd4cdf375fa097789b2484b746cacdfddb73 (patch) | |
| tree | f5ef33bb7abcc51b80c604d0f68802ba804ccd93 /src/libstd/sys/windows | |
| parent | 5c215623020b878353d115b6ddb728a960890a98 (diff) | |
| download | rust-fea1bd4cdf375fa097789b2484b746cacdfddb73.tar.gz rust-fea1bd4cdf375fa097789b2484b746cacdfddb73.zip | |
std: Move platform specific memchr code into sys
Diffstat (limited to 'src/libstd/sys/windows')
| -rw-r--r-- | src/libstd/sys/windows/memchr.rs | 15 | ||||
| -rw-r--r-- | src/libstd/sys/windows/mod.rs | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/libstd/sys/windows/memchr.rs b/src/libstd/sys/windows/memchr.rs new file mode 100644 index 00000000000..5a5386acaa5 --- /dev/null +++ b/src/libstd/sys/windows/memchr.rs @@ -0,0 +1,15 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. +// +// Original implementation taken from rust-memchr +// Copyright 2015 Andrew Gallant, bluss and Nicolas Koch + +// Fallback memchr is fastest on windows +pub use sys_common::memchr::fallback::{memchr, memrchr}; diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs index c31726a4a25..df9cef33927 100644 --- a/src/libstd/sys/windows/mod.rs +++ b/src/libstd/sys/windows/mod.rs @@ -26,6 +26,7 @@ pub mod env; pub mod ext; pub mod fs; pub mod handle; +pub mod memchr; pub mod mutex; pub mod net; pub mod os; |
