summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-12-03 17:00:09 +0000
committerGitHub <noreply@github.com>2022-12-03 17:00:09 +0000
commit691ab1311b9a0fd8616ff3f4cba370d4fdec9378 (patch)
treec45c5b4ed8833ea3c6421ec5abe95ce35efe2984 /src
parented8319c01a3fff74df24bc9c920d742a0f94874e (diff)
parentfab11e97e22df216fd6fd6a663ce575780694b91 (diff)
downloadnix-691ab1311b9a0fd8616ff3f4cba370d4fdec9378.zip
Merge #1855
1855: Nuke IoVec r=asomers a=SUPERCILEX A release cycle went by... it's be nice to remove some bloat. Closes https://github.com/nix-rust/nix/issues/1647, closes https://github.com/nix-rust/nix/issues/1371, closes https://github.com/nix-rust/nix/issues/305 Co-authored-by: Alex Saveau <saveau.alexandre@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/sys/uio.rs72
1 files changed, 0 insertions, 72 deletions
diff --git a/src/sys/uio.rs b/src/sys/uio.rs
index b31c3068..7248bd0c 100644
--- a/src/sys/uio.rs
+++ b/src/sys/uio.rs
@@ -4,7 +4,6 @@ use crate::errno::Errno;
use crate::Result;
use libc::{self, c_int, c_void, off_t, size_t};
use std::io::{IoSlice, IoSliceMut};
-use std::marker::PhantomData;
use std::os::unix::io::RawFd;
/// Low-level vectored write to a raw file descriptor
@@ -145,77 +144,6 @@ pub struct RemoteIoVec {
pub len: usize,
}
-/// A vector of buffers.
-///
-/// Vectored I/O methods like [`writev`] and [`readv`] use this structure for
-/// both reading and writing. Each `IoVec` specifies the base address and
-/// length of an area in memory.
-#[deprecated(
- since = "0.24.0",
- note = "`IoVec` is no longer used in the public interface, use `IoSlice` or `IoSliceMut` instead"
-)]
-#[repr(transparent)]
-#[allow(renamed_and_removed_lints)]
-#[allow(clippy::unknown_clippy_lints)]
-// Clippy false positive: https://github.com/rust-lang/rust-clippy/issues/8867
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
-pub struct IoVec<T>(pub(crate) libc::iovec, PhantomData<T>);
-
-#[allow(deprecated)]
-impl<T> IoVec<T> {
- /// View the `IoVec` as a Rust slice.
- #[deprecated(
- since = "0.24.0",
- note = "Use the `Deref` impl of `IoSlice` or `IoSliceMut` instead"
- )]
- #[inline]
- pub fn as_slice(&self) -> &[u8] {
- use std::slice;
-
- unsafe {
- slice::from_raw_parts(self.0.iov_base as *const u8, self.0.iov_len)
- }
- }
-}
-
-#[allow(deprecated)]
-impl<'a> IoVec<&'a [u8]> {
- /// Create an `IoVec` from a Rust slice.
- #[deprecated(since = "0.24.0", note = "Use `IoSlice::new` instead")]
- pub fn from_slice(buf: &'a [u8]) -> IoVec<&'a [u8]> {
- IoVec(
- libc::iovec {
- iov_base: buf.as_ptr() as *mut c_void,
- iov_len: buf.len() as size_t,
- },
- PhantomData,
- )
- }
-}
-
-#[allow(deprecated)]
-impl<'a> IoVec<&'a mut [u8]> {
- /// Create an `IoVec` from a mutable Rust slice.
- #[deprecated(since = "0.24.0", note = "Use `IoSliceMut::new` instead")]
- pub fn from_mut_slice(buf: &'a mut [u8]) -> IoVec<&'a mut [u8]> {
- IoVec(
- libc::iovec {
- iov_base: buf.as_ptr() as *mut c_void,
- iov_len: buf.len() as size_t,
- },
- PhantomData,
- )
- }
-}
-
-// The only reason IoVec isn't automatically Send+Sync is because libc::iovec
-// contains raw pointers.
-#[allow(deprecated)]
-unsafe impl<T> Send for IoVec<T> where T: Send {}
-#[allow(deprecated)]
-unsafe impl<T> Sync for IoVec<T> where T: Sync {}
-
feature! {
#![feature = "process"]