std: Move platform specific memchr code into sys

This commit is contained in:
Brian Anderson 2016-09-22 00:10:37 +00:00
parent 5c21562302
commit fea1bd4cdf
7 changed files with 309 additions and 271 deletions

View file

@ -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};

View file

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