Skip to content

Commit

Permalink
Merge 8a2677d into 730f717
Browse files Browse the repository at this point in the history
  • Loading branch information
flub authored Oct 4, 2024
2 parents 730f717 + 8a2677d commit ff93420
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Generate Docs
run: cargo doc --workspace --all-features --no-deps
env:
RUSTDOCFLAGS: --cfg docsrs
RUSTDOCFLAGS: --cfg iroh_docsrs

- name: Deploy Docs to Preview Branch
uses: peaceiris/actions-gh-pages@v4
Expand Down
4 changes: 1 addition & 3 deletions iroh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }

[package.metadata.docs.rs]
all-features = true
# enable unstable features in the documentation
rustdoc-args = ["--cfg", "docsrs"]

rustdoc-args = ["--cfg", "iroh_docsrs"]

[[example]]
name = "hello-world-provide"
Expand Down
4 changes: 2 additions & 2 deletions iroh/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
//! - `metrics`: Enable metrics collection. Enabled by default.
//! - `fs-store`: Enables the disk based storage backend for `iroh-blobs`. Enabled by default.
//!
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(iroh_docsrs, feature(doc_cfg))]
#![deny(missing_docs, rustdoc::broken_intra_doc_links)]

// re-export the iroh crates
Expand All @@ -111,5 +111,5 @@ mod rpc_protocol;

/// Expose metrics module
#[cfg(feature = "metrics")]
#[cfg_attr(all(docsrs, feature = "metrics"), doc(cfg(feature = "metrics")))]
#[cfg_attr(iroh_docsrs, doc(cfg(feature = "metrics")))]
pub mod metrics;
3 changes: 3 additions & 0 deletions iroh/src/node/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ where
node_discovery: DiscoveryConfig,
docs_storage: DocsStorage,
#[cfg(any(test, feature = "test-utils"))]
#[cfg_attr(iroh_docsrs, doc(cfg(any(test, feature = "test-utils"))))]
insecure_skip_relay_cert_verify: bool,
/// Callback to register when a gc loop is done
#[debug("callback")]
Expand Down Expand Up @@ -509,13 +510,15 @@ where
///
/// May only be used in tests.
#[cfg(any(test, feature = "test-utils"))]
#[cfg_attr(iroh_docsrs, doc(cfg(any(test, feature = "test-utils"))))]
pub fn insecure_skip_relay_cert_verify(mut self, skip_verify: bool) -> Self {
self.insecure_skip_relay_cert_verify = skip_verify;
self
}

/// Register a callback for when GC is done.
#[cfg(any(test, feature = "test-utils"))]
#[cfg_attr(iroh_docsrs, doc(cfg(any(test, feature = "test-utils"))))]
pub fn register_gc_done_cb(mut self, cb: Box<dyn Fn() + Send>) -> Self {
self.gc_done_callback.replace(cb);
self
Expand Down

0 comments on commit ff93420

Please sign in to comment.