Skip to content

Commit 9d8ac36

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

File tree

27 files changed

+75
-75
lines changed

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()

0 commit comments

Comments
 (0)