Skip to content

Commit 03e86d5

Browse files
committed
Don't implement read_initializer functions manually.
1 parent 1548745 commit 03e86d5

File tree

10 files changed

+0
-62
lines changed

10 files changed

+0
-62
lines changed

build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ fn main() {
88
"clamp", // https://github.com/rust-lang/rust/issues/44095
99
"extend_one", // https://github.com/rust-lang/rust/issues/72631
1010
"pattern", // https://github.com/rust-lang/rust/issues/27721
11-
"read_initializer", // https://github.com/rust-lang/rust/issues/42788
1211
"seek_convenience", // https://github.com/rust-lang/rust/issues/59359
1312
"seek_stream_len ", // https://github.com/rust-lang/rust/issues/59359
1413
"shrink_to", // https://github.com/rust-lang/rust/issues/56431

cap-async-std/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#![deny(missing_docs)]
2828
#![cfg_attr(target_os = "wasi", feature(wasi_ext))]
2929
// async_std doesn't have "can_vector".
30-
// async_std doesn't have "read_initializer".
3130
// async_std doesn't have "seek_convenience".
3231
// async_std doesn't have "with_options".
3332
// async_std doesn't have "write_all_vectored".

cap-fs-ext/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ fn main() {
88
"clamp", // https://github.com/rust-lang/rust/issues/44095
99
"extend_one", // https://github.com/rust-lang/rust/issues/72631
1010
"pattern", // https://github.com/rust-lang/rust/issues/27721
11-
"read_initializer", // https://github.com/rust-lang/rust/issues/42788
1211
"seek_convenience", // https://github.com/rust-lang/rust/issues/59359
1312
"seek_stream_len ", // https://github.com/rust-lang/rust/issues/59359
1413
"shrink_to", // https://github.com/rust-lang/rust/issues/56431

cap-primitives/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ fn main() {
88
"clamp", // https://github.com/rust-lang/rust/issues/44095
99
"extend_one", // https://github.com/rust-lang/rust/issues/72631
1010
"pattern", // https://github.com/rust-lang/rust/issues/27721
11-
"read_initializer", // https://github.com/rust-lang/rust/issues/42788
1211
"seek_convenience", // https://github.com/rust-lang/rust/issues/59359
1312
"seek_stream_len", // https://github.com/rust-lang/rust/issues/59359
1413
"shrink_to", // https://github.com/rust-lang/rust/issues/56431

cap-std/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ fn main() {
88
"clamp", // https://github.com/rust-lang/rust/issues/44095
99
"extend_one", // https://github.com/rust-lang/rust/issues/72631
1010
"pattern", // https://github.com/rust-lang/rust/issues/27721
11-
"read_initializer", // https://github.com/rust-lang/rust/issues/42788
1211
"seek_convenience", // https://github.com/rust-lang/rust/issues/59359
1312
"seek_stream_len", // https://github.com/rust-lang/rust/issues/59359
1413
"shrink_to", // https://github.com/rust-lang/rust/issues/56431

cap-std/src/fs/file.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
use crate::fs::OpenOptions;
33
use crate::fs::{Metadata, Permissions};
44
use cap_primitives::fs::is_file_read_write;
5-
#[cfg(read_initializer)]
6-
use std::io::Initializer;
75
#[cfg(unix)]
86
use std::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
97
#[cfg(target_os = "wasi")]
@@ -231,12 +229,6 @@ impl Read for File {
231229
fn is_read_vectored(&self) -> bool {
232230
self.std.is_read_vectored()
233231
}
234-
235-
#[cfg(read_initializer)]
236-
#[inline]
237-
unsafe fn initializer(&self) -> Initializer {
238-
self.std.initializer()
239-
}
240232
}
241233

242234
impl Read for &File {
@@ -270,12 +262,6 @@ impl Read for &File {
270262
fn is_read_vectored(&self) -> bool {
271263
(&mut &self.std).is_read_vectored()
272264
}
273-
274-
#[cfg(read_initializer)]
275-
#[inline]
276-
unsafe fn initializer(&self) -> Initializer {
277-
(&mut &self.std).initializer()
278-
}
279265
}
280266

281267
impl Write for File {

cap-std/src/fs_utf8/file.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#[cfg(with_options)]
22
use crate::fs::OpenOptions;
33
use crate::fs::{Metadata, Permissions};
4-
#[cfg(read_initializer)]
5-
use std::io::Initializer;
64
#[cfg(unix)]
75
use std::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
86
#[cfg(target_os = "wasi")]
@@ -210,12 +208,6 @@ impl Read for File {
210208
fn is_read_vectored(&self) -> bool {
211209
self.cap_std.is_read_vectored()
212210
}
213-
214-
#[cfg(read_initializer)]
215-
#[inline]
216-
unsafe fn initializer(&self) -> Initializer {
217-
self.cap_std.initializer()
218-
}
219211
}
220212

221213
impl Read for &File {
@@ -249,12 +241,6 @@ impl Read for &File {
249241
fn is_read_vectored(&self) -> bool {
250242
(&mut &self.cap_std).is_read_vectored()
251243
}
252-
253-
#[cfg(read_initializer)]
254-
#[inline]
255-
unsafe fn initializer(&self) -> Initializer {
256-
(&mut &self.cap_std).initializer()
257-
}
258244
}
259245

260246
impl Write for File {

cap-std/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#![deny(missing_docs)]
2828
#![cfg_attr(target_os = "wasi", feature(wasi_ext))]
2929
#![cfg_attr(can_vector, feature(can_vector))]
30-
#![cfg_attr(read_initializer, feature(read_initializer))]
3130
#![cfg_attr(seek_convenience, feature(seek_convenience))]
3231
#![cfg_attr(seek_stream_len, feature(seek_stream_len))]
3332
#![cfg_attr(with_options, feature(with_options))]

cap-std/src/net/tcp_stream.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
use crate::net::{Shutdown, SocketAddr};
2-
#[cfg(read_initializer)]
3-
use std::io::Initializer;
42
#[cfg(unix)]
53
use std::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
64
#[cfg(windows)]
@@ -260,12 +258,6 @@ impl Read for TcpStream {
260258
fn is_read_vectored(&self) -> bool {
261259
self.std.is_read_vectored()
262260
}
263-
264-
#[cfg(read_initializer)]
265-
#[inline]
266-
unsafe fn initializer(&self) -> Initializer {
267-
self.std.initializer()
268-
}
269261
}
270262

271263
impl Read for &TcpStream {
@@ -299,12 +291,6 @@ impl Read for &TcpStream {
299291
fn is_read_vectored(&self) -> bool {
300292
(&mut &self.std).is_read_vectored()
301293
}
302-
303-
#[cfg(read_initializer)]
304-
#[inline]
305-
unsafe fn initializer(&self) -> Initializer {
306-
(&mut &self.std).initializer()
307-
}
308294
}
309295

310296
impl Write for TcpStream {

cap-std/src/os/unix/net/unix_stream.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
use crate::{net::Shutdown, os::unix::net::SocketAddr};
2-
#[cfg(read_initializer)]
3-
use std::io::Initializer;
42
use std::{
53
io::{self, IoSlice, IoSliceMut, Read, Write},
64
os::unix::{
@@ -204,12 +202,6 @@ impl Read for UnixStream {
204202
fn is_read_vectored(&self) -> bool {
205203
self.std.is_read_vectored()
206204
}
207-
208-
#[cfg(read_initializer)]
209-
#[inline]
210-
unsafe fn initializer(&self) -> Initializer {
211-
self.std.initializer()
212-
}
213205
}
214206

215207
impl Read for &UnixStream {
@@ -243,12 +235,6 @@ impl Read for &UnixStream {
243235
fn is_read_vectored(&self) -> bool {
244236
(&mut &self.std).is_read_vectored()
245237
}
246-
247-
#[cfg(read_initializer)]
248-
#[inline]
249-
unsafe fn initializer(&self) -> Initializer {
250-
(&mut &self.std).initializer()
251-
}
252238
}
253239

254240
impl Write for UnixStream {

0 commit comments

Comments
 (0)