Skip to content

Commit 9311686

Browse files
committed
Fixes.
1 parent 698498c commit 9311686

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

Cargo.toml

+7-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ rust-version = "1.63"
2121
os_pipe = { version = "1.0.0", features = ["io_safety"], optional = true }
2222

2323
# Optionally depend on async-std just to provide impls for its types.
24-
async-std = { version = ">=1.12, <=1.13", optional = true }
24+
async-std = { version = "1.13.0", optional = true, features = ["io_safety"] }
2525
# Optionally depend on tokio to implement traits for its types.
2626
tokio = { version = "1.6.0", features = ["io-std", "fs", "net", "process"], optional = true }
2727
# Optionally depend on socket2 to implement traits for its types.
@@ -48,8 +48,13 @@ features = [
4848

4949
[package.metadata.docs.rs]
5050
features = ["close"]
51-
rustdoc-args = ["--cfg", "doc_cfg"]
5251

5352
[features]
5453
default = []
5554
close = ["libc", "hermit-abi", "windows-sys"]
55+
56+
[lints.rust.unexpected_cfgs]
57+
level = "warn"
58+
check-cfg = [
59+
'cfg(wasi_ext)',
60+
]

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#![cfg_attr(all(wasi_ext, target_os = "wasi"), feature(wasi_ext))]
3333
// Currently supported platforms.
3434
#![cfg(any(unix, windows, target_os = "wasi", target_os = "hermit"))]
35-
#![cfg_attr(doc_cfg, feature(doc_cfg))]
35+
#![cfg_attr(docsrs, feature(doc_cfg))]
3636

3737
mod portability;
3838
mod traits;
@@ -133,7 +133,7 @@ pub use portability::{
133133
};
134134

135135
#[cfg(feature = "close")]
136-
#[cfg_attr(doc_cfg, doc(cfg(feature = "close")))]
136+
#[cfg_attr(docsrs, doc(cfg(feature = "close")))]
137137
pub mod example_ffi;
138138
pub mod raw;
139139
pub mod views;

src/views.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -236,22 +236,22 @@ unsafe impl FilelikeViewType for os_pipe::PipeReader {}
236236
unsafe impl SocketlikeViewType for socket2::Socket {}
237237

238238
#[cfg(not(any(target_os = "wasi", target_os = "hermit")))]
239-
#[cfg(feature = "async_std")]
239+
#[cfg(feature = "async-std")]
240240
unsafe impl SocketlikeViewType for async_std::net::TcpStream {}
241241
#[cfg(not(any(target_os = "wasi", target_os = "hermit")))]
242-
#[cfg(feature = "async_std")]
242+
#[cfg(feature = "async-std")]
243243
unsafe impl SocketlikeViewType for async_std::net::TcpListener {}
244244
#[cfg(not(any(target_os = "wasi", target_os = "hermit")))]
245-
#[cfg(feature = "async_std")]
245+
#[cfg(feature = "async-std")]
246246
unsafe impl SocketlikeViewType for async_std::net::UdpSocket {}
247247
#[cfg(unix)]
248-
#[cfg(feature = "async_std")]
248+
#[cfg(feature = "async-std")]
249249
unsafe impl SocketlikeViewType for async_std::os::unix::net::UnixStream {}
250250
#[cfg(unix)]
251-
#[cfg(feature = "async_std")]
251+
#[cfg(feature = "async-std")]
252252
unsafe impl SocketlikeViewType for async_std::os::unix::net::UnixListener {}
253253
#[cfg(unix)]
254-
#[cfg(feature = "async_std")]
254+
#[cfg(feature = "async-std")]
255255
unsafe impl SocketlikeViewType for async_std::os::unix::net::UnixDatagram {}
256256

257257
#[cfg(feature = "mio")]

0 commit comments

Comments
 (0)