Skip to content

Commit 9d8ac36

Browse files
author
Stjepan Glavina
committed
Rename feature docs.rs to docs
1 parent 756da0e commit 9d8ac36

27 files changed

+75
-75
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ keywords = []
1212
categories = ["asynchronous", "concurrency"]
1313

1414
[package.metadata.docs.rs]
15-
features = ["docs.rs"]
16-
rustdoc-args = ["--features docs.rs"]
15+
features = ["docs"]
16+
rustdoc-args = ["--features docs"]
1717

1818
[features]
19-
"docs.rs" = []
19+
docs = []
2020

2121
[dependencies]
2222
async-task = { path = "async-task" }

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ git clone git@github.com:stjepang/async-std.git && cd async-std
2525
Read the docs:
2626

2727
```
28-
cargo doc --features docs.rs --open
28+
cargo doc --features docs --open
2929
```
3030

3131
Check out the [examples](examples). To run an example:

src/fs/dir_builder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,16 @@ impl DirBuilder {
102102
}
103103

104104
cfg_if! {
105-
if #[cfg(feature = "docs.rs")] {
105+
if #[cfg(feature = "docs")] {
106106
use crate::os::unix::fs::DirBuilderExt;
107107
} else if #[cfg(unix)] {
108108
use std::os::unix::fs::DirBuilderExt;
109109
}
110110
}
111111

112-
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))]
112+
#[cfg_attr(feature = "docs", doc(cfg(unix)))]
113113
cfg_if! {
114-
if #[cfg(any(unix, feature = "docs.rs"))] {
114+
if #[cfg(any(unix, feature = "docs"))] {
115115
impl DirBuilderExt for DirBuilder {
116116
fn mode(&mut self, mode: u32) -> &mut Self {
117117
self.mode = Some(mode);

src/fs/dir_entry.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,16 +228,16 @@ fn io_error(err: impl Into<Box<dyn std::error::Error + Send + Sync>>) -> io::Err
228228
}
229229

230230
cfg_if! {
231-
if #[cfg(feature = "docs.rs")] {
231+
if #[cfg(feature = "docs")] {
232232
use crate::os::unix::fs::DirEntryExt;
233233
} else if #[cfg(unix)] {
234234
use std::os::unix::fs::DirEntryExt;
235235
}
236236
}
237237

238-
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))]
238+
#[cfg_attr(feature = "docs", doc(cfg(unix)))]
239239
cfg_if! {
240-
if #[cfg(any(unix, feature = "docs.rs"))] {
240+
if #[cfg(any(unix, feature = "docs"))] {
241241
impl DirEntryExt for DirEntry {
242242
fn ino(&self) -> u64 {
243243
self.ino

src/fs/file.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ impl From<std::fs::File> for File {
772772
}
773773

774774
cfg_if! {
775-
if #[cfg(feature = "docs.rs")] {
775+
if #[cfg(feature = "docs")] {
776776
use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
777777
use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle};
778778
} else if #[cfg(unix)] {
@@ -782,9 +782,9 @@ cfg_if! {
782782
}
783783
}
784784

785-
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))]
785+
#[cfg_attr(feature = "docs", doc(cfg(unix)))]
786786
cfg_if! {
787-
if #[cfg(any(unix, feature = "docs.rs"))] {
787+
if #[cfg(any(unix, feature = "docs"))] {
788788
impl AsRawFd for File {
789789
fn as_raw_fd(&self) -> RawFd {
790790
self.raw_fd
@@ -805,9 +805,9 @@ cfg_if! {
805805
}
806806
}
807807

808-
#[cfg_attr(feature = "docs.rs", doc(cfg(windows)))]
808+
#[cfg_attr(feature = "docs", doc(cfg(windows)))]
809809
cfg_if! {
810-
if #[cfg(any(windows, feature = "docs.rs"))] {
810+
if #[cfg(any(windows, feature = "docs"))] {
811811
impl AsRawHandle for File {
812812
fn as_raw_handle(&self) -> RawHandle {
813813
self.raw_handle.0

src/fs/open_options.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,16 +333,16 @@ impl OpenOptions {
333333
}
334334

335335
cfg_if! {
336-
if #[cfg(feature = "docs.rs")] {
336+
if #[cfg(feature = "docs")] {
337337
use crate::os::unix::fs::OpenOptionsExt;
338338
} else if #[cfg(unix)] {
339339
use std::os::unix::fs::OpenOptionsExt;
340340
}
341341
}
342342

343-
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))]
343+
#[cfg_attr(feature = "docs", doc(cfg(unix)))]
344344
cfg_if! {
345-
if #[cfg(any(unix, feature = "docs.rs"))] {
345+
if #[cfg(any(unix, feature = "docs"))] {
346346
impl OpenOptionsExt for OpenOptions {
347347
fn mode(&mut self, mode: u32) -> &mut Self {
348348
self.0.mode(mode);

src/io/buf_read.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::future::Future;
1010
use crate::task::{Context, Poll};
1111

1212
cfg_if! {
13-
if #[cfg(feature = "docs.rs")] {
13+
if #[cfg(feature = "docs")] {
1414
#[doc(hidden)]
1515
pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>);
1616

@@ -33,7 +33,7 @@ cfg_if! {
3333
///
3434
/// [`std::io::BufRead`]: https://doc.rust-lang.org/std/io/trait.BufRead.html
3535
/// [`futures::io::AsyncBufRead`]:
36-
/// https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncBufRead.html
36+
/// https://docs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncBufRead.html
3737
pub trait BufRead {
3838
/// Reads all bytes into `buf` until the delimiter `byte` or EOF is reached.
3939
///

src/io/read.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::io;
1111
use crate::task::{Context, Poll};
1212

1313
cfg_if! {
14-
if #[cfg(feature = "docs.rs")] {
14+
if #[cfg(feature = "docs")] {
1515
#[doc(hidden)]
1616
pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>);
1717

@@ -34,7 +34,7 @@ cfg_if! {
3434
///
3535
/// [`std::io::Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
3636
/// [`futures::io::AsyncRead`]:
37-
/// https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncRead.html
37+
/// https://docs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncRead.html
3838
pub trait Read {
3939
/// Reads some bytes from the byte stream.
4040
///

src/io/seek.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::io;
99
use crate::task::{Context, Poll};
1010

1111
cfg_if! {
12-
if #[cfg(feature = "docs.rs")] {
12+
if #[cfg(feature = "docs")] {
1313
#[doc(hidden)]
1414
pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>);
1515

@@ -32,7 +32,7 @@ cfg_if! {
3232
///
3333
/// [`std::io::Seek`]: https://doc.rust-lang.org/std/io/trait.Seek.html
3434
/// [`futures::io::AsyncSeek`]:
35-
/// https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncSeek.html
35+
/// https://docs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncSeek.html
3636
pub trait Seek {
3737
/// Seeks to a new position in a byte stream.
3838
///

src/io/stderr.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ impl futures::io::AsyncWrite for Stderr {
163163
}
164164

165165
cfg_if! {
166-
if #[cfg(feature = "docs.rs")] {
166+
if #[cfg(feature = "docs")] {
167167
use crate::os::unix::io::{AsRawFd, RawFd};
168168
use crate::os::windows::io::{AsRawHandle, RawHandle};
169169
} else if #[cfg(unix)] {
@@ -173,9 +173,9 @@ cfg_if! {
173173
}
174174
}
175175

176-
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))]
176+
#[cfg_attr(feature = "docs", doc(cfg(unix)))]
177177
cfg_if! {
178-
if #[cfg(any(unix, feature = "docs.rs"))] {
178+
if #[cfg(any(unix, feature = "docs"))] {
179179
impl AsRawFd for Stderr {
180180
fn as_raw_fd(&self) -> RawFd {
181181
io::stderr().as_raw_fd()
@@ -184,9 +184,9 @@ cfg_if! {
184184
}
185185
}
186186

187-
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))]
187+
#[cfg_attr(feature = "docs", doc(cfg(unix)))]
188188
cfg_if! {
189-
if #[cfg(any(windows, feature = "docs.rs"))] {
189+
if #[cfg(any(windows, feature = "docs"))] {
190190
impl AsRawHandle for Stderr {
191191
fn as_raw_handle(&self) -> RawHandle {
192192
io::stderr().as_raw_handle()

src/io/stdin.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ impl futures::io::AsyncRead for Stdin {
195195
}
196196

197197
cfg_if! {
198-
if #[cfg(feature = "docs.rs")] {
198+
if #[cfg(feature = "docs")] {
199199
use crate::os::unix::io::{AsRawFd, RawFd};
200200
use crate::os::windows::io::{AsRawHandle, RawHandle};
201201
} else if #[cfg(unix)] {
@@ -205,9 +205,9 @@ cfg_if! {
205205
}
206206
}
207207

208-
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))]
208+
#[cfg_attr(feature = "docs", doc(cfg(unix)))]
209209
cfg_if! {
210-
if #[cfg(any(unix, feature = "docs.rs"))] {
210+
if #[cfg(any(unix, feature = "docs"))] {
211211
impl AsRawFd for Stdin {
212212
fn as_raw_fd(&self) -> RawFd {
213213
io::stdin().as_raw_fd()
@@ -216,9 +216,9 @@ cfg_if! {
216216
}
217217
}
218218

219-
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))]
219+
#[cfg_attr(feature = "docs", doc(cfg(unix)))]
220220
cfg_if! {
221-
if #[cfg(any(windows, feature = "docs.rs"))] {
221+
if #[cfg(any(windows, feature = "docs"))] {
222222
impl AsRawHandle for Stdin {
223223
fn as_raw_handle(&self) -> RawHandle {
224224
io::stdin().as_raw_handle()

src/io/stdout.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ impl futures::io::AsyncWrite for Stdout {
163163
}
164164

165165
cfg_if! {
166-
if #[cfg(feature = "docs.rs")] {
166+
if #[cfg(feature = "docs")] {
167167
use crate::os::unix::io::{AsRawFd, RawFd};
168168
use crate::os::windows::io::{AsRawHandle, RawHandle};
169169
} else if #[cfg(unix)] {
@@ -173,9 +173,9 @@ cfg_if! {
173173
}
174174
}
175175

176-
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))]
176+
#[cfg_attr(feature = "docs", doc(cfg(unix)))]
177177
cfg_if! {
178-
if #[cfg(any(unix, feature = "docs.rs"))] {
178+
if #[cfg(any(unix, feature = "docs"))] {
179179
impl AsRawFd for Stdout {
180180
fn as_raw_fd(&self) -> RawFd {
181181
io::stdout().as_raw_fd()
@@ -184,9 +184,9 @@ cfg_if! {
184184
}
185185
}
186186

187-
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))]
187+
#[cfg_attr(feature = "docs", doc(cfg(unix)))]
188188
cfg_if! {
189-
if #[cfg(any(windows, feature = "docs.rs"))] {
189+
if #[cfg(any(windows, feature = "docs"))] {
190190
impl AsRawHandle for Stdout {
191191
fn as_raw_handle(&self) -> RawHandle {
192192
io::stdout().as_raw_handle()

src/io/write.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::io;
1010
use crate::task::{Context, Poll};
1111

1212
cfg_if! {
13-
if #[cfg(feature = "docs.rs")] {
13+
if #[cfg(feature = "docs")] {
1414
#[doc(hidden)]
1515
pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>);
1616

@@ -33,7 +33,7 @@ cfg_if! {
3333
///
3434
/// [`std::io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
3535
/// [`futures::io::AsyncWrite`]:
36-
/// https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncWrite.html
36+
/// https://docs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncWrite.html
3737
pub trait Write {
3838
/// Writes some bytes into the byte stream.
3939
///

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
//! ```
2121
2222
#![feature(async_await)]
23-
#![cfg_attr(feature = "docs.rs", feature(doc_cfg))]
23+
#![cfg_attr(feature = "docs", feature(doc_cfg))]
2424
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
2525
#![doc(html_logo_url = "https://async.rs/images/logo--hero.svg")]
2626

src/net/tcp/listener.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ impl From<net::TcpListener> for TcpListener {
260260
}
261261

262262
cfg_if! {
263-
if #[cfg(feature = "docs.rs")] {
263+
if #[cfg(feature = "docs")] {
264264
use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
265265
// use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle};
266266
} else if #[cfg(unix)] {
@@ -270,9 +270,9 @@ cfg_if! {
270270
}
271271
}
272272

273-
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))]
273+
#[cfg_attr(feature = "docs", doc(cfg(unix)))]
274274
cfg_if! {
275-
if #[cfg(any(unix, feature = "docs.rs"))] {
275+
if #[cfg(any(unix, feature = "docs"))] {
276276
impl AsRawFd for TcpListener {
277277
fn as_raw_fd(&self) -> RawFd {
278278
self.raw_fd
@@ -293,9 +293,9 @@ cfg_if! {
293293
}
294294
}
295295

296-
#[cfg_attr(feature = "docs.rs", doc(cfg(windows)))]
296+
#[cfg_attr(feature = "docs", doc(cfg(windows)))]
297297
cfg_if! {
298-
if #[cfg(any(windows, feature = "docs.rs"))] {
298+
if #[cfg(any(windows, feature = "docs"))] {
299299
// impl AsRawSocket for TcpListener {
300300
// fn as_raw_socket(&self) -> RawSocket {
301301
// self.raw_socket

src/net/tcp/stream.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ use crate::task::{Context, Poll};
2424
/// [`connect`]: struct.TcpStream.html#method.connect
2525
/// [accepting]: struct.TcpListener.html#method.accept
2626
/// [listener]: struct.TcpListener.html
27-
/// [`AsyncRead`]: https://docs.rs/futures-preview/0.3.0-alpha.13/futures/io/trait.AsyncRead.html
28-
/// [`AsyncWrite`]: https://docs.rs/futures-preview/0.3.0-alpha.13/futures/io/trait.AsyncRead.html
29-
/// [`futures::io`]: https://docs.rs/futures-preview/0.3.0-alpha.13/futures/io
27+
/// [`AsyncRead`]: https://docs/futures-preview/0.3.0-alpha.13/futures/io/trait.AsyncRead.html
28+
/// [`AsyncWrite`]: https://docs/futures-preview/0.3.0-alpha.13/futures/io/trait.AsyncRead.html
29+
/// [`futures::io`]: https://docs/futures-preview/0.3.0-alpha.13/futures/io
3030
/// [`shutdown`]: struct.TcpStream.html#method.shutdown
3131
/// [`std::net::TcpStream`]: https://doc.rust-lang.org/std/net/struct.TcpStream.html
3232
///
@@ -463,7 +463,7 @@ impl From<net::TcpStream> for TcpStream {
463463
}
464464

465465
cfg_if! {
466-
if #[cfg(feature = "docs.rs")] {
466+
if #[cfg(feature = "docs")] {
467467
use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
468468
// use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle};
469469
} else if #[cfg(unix)] {
@@ -473,9 +473,9 @@ cfg_if! {
473473
}
474474
}
475475

476-
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))]
476+
#[cfg_attr(feature = "docs", doc(cfg(unix)))]
477477
cfg_if! {
478-
if #[cfg(any(unix, feature = "docs.rs"))] {
478+
if #[cfg(any(unix, feature = "docs"))] {
479479
impl AsRawFd for TcpStream {
480480
fn as_raw_fd(&self) -> RawFd {
481481
self.raw_fd
@@ -496,9 +496,9 @@ cfg_if! {
496496
}
497497
}
498498

499-
#[cfg_attr(feature = "docs.rs", doc(cfg(windows)))]
499+
#[cfg_attr(feature = "docs", doc(cfg(windows)))]
500500
cfg_if! {
501-
if #[cfg(any(windows, feature = "docs.rs"))] {
501+
if #[cfg(any(windows, feature = "docs"))] {
502502
// impl AsRawSocket for TcpStream {
503503
// fn as_raw_socket(&self) -> RawSocket {
504504
// self.raw_socket

0 commit comments

Comments
 (0)