Skip to content

Commit ec727c3

Browse files
committed
use doc_auto_cfg
also fix warning regarding urkls in readme to test: RUSTDOCFLAGS="--cfg iroh_docsrs" cargo +nightly doc --all-features --no-deps --open
1 parent a9164c4 commit ec727c3

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ Examples that use `iroh-blobs` can be found in the `iroh` crate. the iroh crate
7878
This project is licensed under either of
7979

8080
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
81-
http://www.apache.org/licenses/LICENSE-2.0)
81+
<http://www.apache.org/licenses/LICENSE-2.0>)
8282
* MIT license ([LICENSE-MIT](LICENSE-MIT) or
83-
http://opensource.org/licenses/MIT)
83+
<http://opensource.org/licenses/MIT>)
8484

8585
at your option.
8686

src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,22 @@
2626
//! [iroh]: https://docs.rs/iroh
2727
#![deny(missing_docs, rustdoc::broken_intra_doc_links)]
2828
#![recursion_limit = "256"]
29-
#![cfg_attr(iroh_docsrs, feature(doc_cfg))]
29+
#![cfg_attr(iroh_docsrs, feature(doc_auto_cfg))]
3030

3131
#[cfg(feature = "cli")]
32-
#[cfg_attr(iroh_docsrs, doc(cfg(feature = "cli")))]
3332
pub mod cli;
3433
#[cfg(feature = "downloader")]
35-
#[cfg_attr(iroh_docsrs, doc(cfg(feature = "downloader")))]
3634
pub mod downloader;
3735
pub mod export;
3836
pub mod format;
3937
pub mod get;
4038
pub mod hashseq;
4139
pub mod metrics;
4240
#[cfg(feature = "net_protocol")]
43-
#[cfg_attr(iroh_docsrs, doc(cfg(feature = "net_protocol")))]
4441
pub mod net_protocol;
4542
pub mod protocol;
4643
pub mod provider;
4744
#[cfg(feature = "rpc")]
48-
#[cfg_attr(iroh_docsrs, doc(cfg(feature = "rpc")))]
4945
pub mod rpc;
5046
pub mod store;
5147
pub mod ticket;

src/util/fs.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,12 @@ pub fn scan_path(
7575
}
7676

7777
#[cfg(feature = "rpc")]
78-
#[cfg_attr(iroh_docsrs, doc(cfg(feature = "rpc")))]
7978
fn file_name(path: &Path) -> anyhow::Result<String> {
8079
relative_canonicalized_path_to_string(path.file_name().context("path is invalid")?)
8180
}
8281

8382
/// Create data sources from a directory.
8483
#[cfg(feature = "rpc")]
85-
#[cfg_attr(iroh_docsrs, doc(cfg(feature = "rpc")))]
8684
pub fn scan_dir(
8785
root: PathBuf,
8886
wrap: crate::rpc::client::blobs::WrapOption,
@@ -129,7 +127,6 @@ pub fn relative_canonicalized_path_to_string(path: impl AsRef<Path>) -> anyhow::
129127
/// Loads a [`iroh::SecretKey`] from the provided file, or stores a newly generated one
130128
/// at the given location.
131129
#[cfg(feature = "rpc")]
132-
#[cfg_attr(iroh_docsrs, doc(cfg(feature = "rpc")))]
133130
pub async fn load_secret_key(key_path: PathBuf) -> anyhow::Result<iroh::SecretKey> {
134131
use iroh::SecretKey;
135132
use tokio::io::AsyncWriteExt;

0 commit comments

Comments
 (0)