From 6b05f0e3ba53579749f16e52b9d5b4e5fa473f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Klaehn?= Date: Fri, 13 Dec 2024 14:10:06 +0200 Subject: [PATCH] use auto docs (#21) also fix links in README.md so we don't get a warning for naked links --- README.md | 4 ++-- src/lib.rs | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1d0f6ee..ad0ccae 100644 --- a/README.md +++ b/README.md @@ -86,9 +86,9 @@ async fn main() -> anyhow::Result<()> { This project is licensed under either of * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or - http://www.apache.org/licenses/LICENSE-2.0) + ) * MIT license ([LICENSE-MIT](LICENSE-MIT) or - http://opensource.org/licenses/MIT) + ) at your option. diff --git a/src/lib.rs b/src/lib.rs index e4dc865..653715d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,28 +33,22 @@ //! //! [paper]: https://arxiv.org/abs/2212.13567 #![deny(missing_docs, rustdoc::broken_intra_doc_links)] -#![cfg_attr(iroh_docsrs, feature(doc_cfg))] +#![cfg_attr(iroh_docsrs, feature(doc_auto_cfg))] pub mod metrics; #[cfg(feature = "net")] -#[cfg_attr(iroh_docsrs, doc(cfg(feature = "net")))] pub mod net; #[cfg(feature = "engine")] -#[cfg_attr(iroh_docsrs, doc(cfg(feature = "engine")))] pub mod protocol; #[cfg(feature = "net")] -#[cfg_attr(iroh_docsrs, doc(cfg(feature = "net")))] mod ticket; #[cfg(feature = "engine")] -#[cfg_attr(iroh_docsrs, doc(cfg(feature = "engine")))] pub mod engine; #[cfg(feature = "rpc")] -#[cfg_attr(iroh_docsrs, doc(cfg(feature = "rpc")))] pub mod rpc; #[cfg(feature = "cli")] -#[cfg_attr(iroh_docsrs, doc(cfg(feature = "cli")))] pub mod cli; pub mod actor; @@ -66,11 +60,9 @@ mod keys; mod ranger; #[cfg(feature = "net")] -#[cfg_attr(iroh_docsrs, doc(cfg(feature = "net")))] #[doc(inline)] pub use net::ALPN; #[cfg(feature = "net")] -#[cfg_attr(iroh_docsrs, doc(cfg(feature = "net")))] pub use self::ticket::DocTicket; pub use self::{heads::*, keys::*, sync::*};