summaryrefslogtreecommitdiff
path: root/src/sys/uio.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/uio.rs')
-rw-r--r--src/sys/uio.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sys/uio.rs b/src/sys/uio.rs
index c785225b..7447f3ff 100644
--- a/src/sys/uio.rs
+++ b/src/sys/uio.rs
@@ -62,7 +62,7 @@ pub fn pread(fd: RawFd, buf: &mut [u8], offset: off_t) -> Result<usize>{
///
/// This is the same underlying C structure as [`IoVec`](struct.IoVec.html),
/// except that it refers to memory in some other process, and is
-/// therefore not represented in Rust by an actual slice as IoVec is. It
+/// therefore not represented in Rust by an actual slice as `IoVec` is. It
/// is used with [`process_vm_readv`](fn.process_vm_readv.html)
/// and [`process_vm_writev`](fn.process_vm_writev.html).
#[cfg(target_os = "linux")]
@@ -81,7 +81,7 @@ pub struct RemoteIoVec {
/// and `remote_iov` is a list of [`RemoteIoVec`]s identifying where the
/// data should be written in the target process. On success, returns the
/// number of bytes written, which will always be a whole
-/// number of remote_iov chunks.
+/// number of `remote_iov` chunks.
///
/// This requires the same permissions as debugging the process using
/// [ptrace]: you must either be a privileged process (with
@@ -112,17 +112,17 @@ pub fn process_vm_writev(pid: ::unistd::Pid, local_iov: &[IoVec<&[u8]>], remote_
/// data into, and `remote_iov` is a list of [`RemoteIoVec`]s identifying
/// where the source data is in the target process. On success,
/// returns the number of bytes written, which will always be a whole
-/// number of remote_iov chunks.
+/// number of `remote_iov` chunks.
///
/// This requires the same permissions as debugging the process using
-/// [ptrace]: you must either be a privileged process (with
+/// [`ptrace`]: you must either be a privileged process (with
/// `CAP_SYS_PTRACE`), or you must be running as the same user as the
/// target process and the OS must have unprivileged debugging enabled.
///
/// This function is only available on Linux.
///
/// [`process_vm_readv`(2)]: http://man7.org/linux/man-pages/man2/process_vm_readv.2.html
-/// [ptrace]: ../ptrace/index.html
+/// [`ptrace`]: ../ptrace/index.html
/// [`IoVec`]: struct.IoVec.html
/// [`RemoteIoVec`]: struct.RemoteIoVec.html
#[cfg(any(target_os = "linux"))]
@@ -141,7 +141,7 @@ pub struct IoVec<T>(libc::iovec, PhantomData<T>);
impl<T> IoVec<T> {
#[inline]
- pub fn as_slice<'a>(&'a self) -> &'a [u8] {
+ pub fn as_slice(&self) -> &[u8] {
use std::slice;
unsafe {