Skip to content

Commit

Permalink
.github/workflows: Deny cargo doc warnings in CI (#2936)
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Eizinger <[email protected]>
  • Loading branch information
ddimaria and thomaseizinger authored Oct 4, 2022
1 parent a7a96e5 commit e6da99e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # v2.0.0

- name: Check rustdoc links
run: RUSTDOCFLAGS="--deny broken_intra_doc_links" cargo doc --verbose --workspace --no-deps --document-private-items --all-features
run: RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links --deny warnings" cargo doc --verbose --workspace --no-deps --all-features

check-clippy:
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions protocols/gossipsub/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ impl GossipsubConfig {
/// connected/trusted nodes. The default is false.
///
/// Note: Peer exchange is not implemented today, see
/// https://github.com/libp2p/rust-libp2p/issues/2398.
/// <https://github.com/libp2p/rust-libp2p/issues/2398>.
pub fn do_px(&self) -> bool {
self.do_px
}
Expand Down Expand Up @@ -334,7 +334,7 @@ impl GossipsubConfig {
/// Number of heartbeat ticks that specifcy the interval in which opportunistic grafting is
/// applied. Every `opportunistic_graft_ticks` we will attempt to select some high-scoring mesh
/// peers to replace lower-scoring ones, if the median score of our mesh peers falls below a
/// threshold (see https://godoc.org/github.com/libp2p/go-libp2p-pubsub#PeerScoreThresholds).
/// threshold (see <https://godoc.org/github.com/libp2p/go-libp2p-pubsub#PeerScoreThresholds>).
/// The default is 60.
pub fn opportunistic_graft_ticks(&self) -> u64 {
self.opportunistic_graft_ticks
Expand Down Expand Up @@ -650,7 +650,7 @@ impl GossipsubConfigBuilder {
/// connected/trusted nodes. The default is false.
///
/// Note: Peer exchange is not implemented today, see
/// https://github.com/libp2p/rust-libp2p/issues/2398.
/// <https://github.com/libp2p/rust-libp2p/issues/2398>.
pub fn do_px(&mut self) -> &mut Self {
self.config.do_px = true;
self
Expand Down Expand Up @@ -725,7 +725,7 @@ impl GossipsubConfigBuilder {
/// Number of heartbeat ticks that specifcy the interval in which opportunistic grafting is
/// applied. Every `opportunistic_graft_ticks` we will attempt to select some high-scoring mesh
/// peers to replace lower-scoring ones, if the median score of our mesh peers falls below a
/// threshold (see https://godoc.org/github.com/libp2p/go-libp2p-pubsub#PeerScoreThresholds).
/// threshold (see <https://godoc.org/github.com/libp2p/go-libp2p-pubsub#PeerScoreThresholds>).
/// The default is 60.
pub fn opportunistic_graft_ticks(&mut self, opportunistic_graft_ticks: u64) -> &mut Self {
self.config.opportunistic_graft_ticks = opportunistic_graft_ticks;
Expand Down
2 changes: 1 addition & 1 deletion protocols/gossipsub/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//! # Overview
//!
//! *Note: The gossipsub protocol specifications
//! (https://github.com/libp2p/specs/tree/master/pubsub/gossipsub) provide an outline for the
//! (<https://github.com/libp2p/specs/tree/master/pubsub/gossipsub>) provide an outline for the
//! routing protocol. They should be consulted for further detail.*
//!
//! Gossipsub is a blend of meshsub for data and randomsub for mesh metadata. It provides bounded
Expand Down
4 changes: 2 additions & 2 deletions swarm/src/dial_opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl WithPeerId {
}

/// Override
/// [`PoolConfig::with_dial_concurrency_factor`](crate::connection::pool::PoolConfig::with_dial_concurrency_factor).
/// Number of addresses concurrently dialed for a single outbound connection attempt.
pub fn override_dial_concurrency_factor(mut self, factor: NonZeroU8) -> Self {
self.dial_concurrency_factor_override = Some(factor);
self
Expand Down Expand Up @@ -196,7 +196,7 @@ impl WithPeerIdWithAddresses {
}

/// Override
/// [`PoolConfig::with_dial_concurrency_factor`](crate::connection::pool::PoolConfig::with_dial_concurrency_factor).
/// Number of addresses concurrently dialed for a single outbound connection attempt.
pub fn override_dial_concurrency_factor(mut self, factor: NonZeroU8) -> Self {
self.dial_concurrency_factor_override = Some(factor);
self
Expand Down
10 changes: 8 additions & 2 deletions swarm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1368,9 +1368,15 @@ where
self
}

/// The maximum number of inbound streams concurrently negotiating on a connection.
/// The maximum number of inbound streams concurrently negotiating on a
/// connection. New inbound streams exceeding the limit are dropped and thus
/// reset.
///
/// See [`PoolConfig::with_max_negotiating_inbound_streams`].
/// Note: This only enforces a limit on the number of concurrently
/// negotiating inbound streams. The total number of inbound streams on a
/// connection is the sum of negotiating and negotiated streams. A limit on
/// the total number of streams can be enforced at the
/// [`StreamMuxerBox`](libp2p_core::muxing::StreamMuxerBox) level.
pub fn max_negotiating_inbound_streams(mut self, v: usize) -> Self {
self.pool_config = self.pool_config.with_max_negotiating_inbound_streams(v);
self
Expand Down

0 comments on commit e6da99e

Please sign in to comment.