about summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-05-20 17:56:46 +0200
committerGitHub <noreply@github.com>2021-05-20 17:56:46 +0200
commit0d3bee8be03e58cfe0295a775961a4daa2ea2fd1 (patch)
tree7bbf034849d62e31e35417daabc14711e74bff02 /library/std/src/sys
parent8a57820bca64a252489790a57cb5ea23db6f9198 (diff)
parent5353c5c3fb7ebc4fb12ca3488c555ee3006c8325 (diff)
downloadrust-0d3bee8be03e58cfe0295a775961a4daa2ea2fd1.tar.gz
rust-0d3bee8be03e58cfe0295a775961a4daa2ea2fd1.zip
Rollup merge of #85275 - CDirkx:memchr, r=m-ou-se
Move `std::memchr` to `sys_common`

`std::memchr` is a thin abstraction over the different `memchr` implementations in `sys`, along with documentation and tests. The module is only used internally by `std`, nothing is exported externally. Code like this is exactly what the `sys_common` module is for, so this PR moves it there.
Diffstat (limited to 'library/std/src/sys')
-rw-r--r--library/std/src/sys/hermit/os.rs2
-rw-r--r--library/std/src/sys/unix/os.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/hermit/os.rs b/library/std/src/sys/hermit/os.rs
index 81cd68a74e6..40bd393098f 100644
--- a/library/std/src/sys/hermit/os.rs
+++ b/library/std/src/sys/hermit/os.rs
@@ -4,11 +4,11 @@ use crate::ffi::{CStr, OsStr, OsString};
 use crate::fmt;
 use crate::io;
 use crate::marker::PhantomData;
-use crate::memchr;
 use crate::path::{self, PathBuf};
 use crate::str;
 use crate::sync::Mutex;
 use crate::sys::hermit::abi;
+use crate::sys::memchr;
 use crate::sys::unsupported;
 use crate::sys_common::os_str_bytes::*;
 use crate::vec;
diff --git a/library/std/src/sys/unix/os.rs b/library/std/src/sys/unix/os.rs
index 51c3e5d175c..bbc4691d963 100644
--- a/library/std/src/sys/unix/os.rs
+++ b/library/std/src/sys/unix/os.rs
@@ -13,13 +13,13 @@ use crate::fmt;
 use crate::io;
 use crate::iter;
 use crate::mem;
-use crate::memchr;
 use crate::path::{self, PathBuf};
 use crate::ptr;
 use crate::slice;
 use crate::str;
 use crate::sys::cvt;
 use crate::sys::fd;
+use crate::sys::memchr;
 use crate::sys::rwlock::{RWLockReadGuard, StaticRWLock};
 use crate::sys_common::mutex::{StaticMutex, StaticMutexGuard};
 use crate::vec;