about summary refs log tree commit diff
path: root/library/std/src/ffi
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/ffi
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/ffi')
-rw-r--r--library/std/src/ffi/c_str.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/ffi/c_str.rs b/library/std/src/ffi/c_str.rs
index 302f12af6a0..2a4ef553be3 100644
--- a/library/std/src/ffi/c_str.rs
+++ b/library/std/src/ffi/c_str.rs
@@ -10,7 +10,6 @@ use crate::error::Error;
 use crate::fmt::{self, Write};
 use crate::io;
 use crate::mem;
-use crate::memchr;
 use crate::num::NonZeroU8;
 use crate::ops;
 use crate::os::raw::c_char;
@@ -20,6 +19,7 @@ use crate::slice;
 use crate::str::{self, Utf8Error};
 use crate::sync::Arc;
 use crate::sys;
+use crate::sys_common::memchr;
 
 /// A type representing an owned, C-compatible, nul-terminated string with no nul bytes in the
 /// middle.