Skip to content

Commit

Permalink
chore: fix format with nightly
Browse files Browse the repository at this point in the history
Fix formatting with nightly.

Without nightly, some of our `rustfmt.toml` rules aren't applied because they are not stable yet (e.g. our `group_imports` rule).
Our CI didn't catch it yet because it doesn't check fmt on nightly. Will fix that in a follow-up PR.

Pull-Request: #5742.
  • Loading branch information
elenaf9 authored Dec 15, 2024
1 parent ebc01e6 commit 577036a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
7 changes: 3 additions & 4 deletions libp2p/src/builder/phase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,22 @@ mod websocket;

use bandwidth_logging::*;
use bandwidth_metrics::*;
pub use behaviour::BehaviourError;
use behaviour::*;
use build::*;
use dns::*;
use libp2p_core::{muxing::StreamMuxerBox, Transport};
use libp2p_identity::Keypair;
pub use other_transport::TransportError;
use other_transport::*;
use provider::*;
use quic::*;
use relay::*;
use swarm::*;
use tcp::*;
use websocket::*;

pub use behaviour::BehaviourError;
pub use other_transport::TransportError;
#[cfg(all(not(target_arch = "wasm32"), feature = "websocket"))]
pub use websocket::WebsocketError;
use websocket::*;

use super::{
select_muxer::SelectMuxerUpgrade, select_security::SelectSecurityUpgrade, SwarmBuilder,
Expand Down
11 changes: 7 additions & 4 deletions swarm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1497,14 +1497,17 @@ impl Config {
///
/// Defaults to 10s.
///
/// Typically, you shouldn't _need_ to modify this default as connections will be kept alive whilst they are "in use" (see below).
/// Depending on the application's usecase, it may be desirable to keep connections alive despite them not being in use.
/// Typically, you shouldn't _need_ to modify this default as connections will be kept alive
/// whilst they are "in use" (see below). Depending on the application's usecase, it may be
/// desirable to keep connections alive despite them not being in use.
///
/// A connection is considered idle if:
/// - There are no active inbound streams.
/// - There are no active outbounds streams.
/// - There are no pending outbound streams (i.e. all streams requested via [`ConnectionHandlerEvent::OutboundSubstreamRequest`] have completed).
/// - Every [`ConnectionHandler`] returns `false` from [`ConnectionHandler::connection_keep_alive`].
/// - There are no pending outbound streams (i.e. all streams requested via
/// [`ConnectionHandlerEvent::OutboundSubstreamRequest`] have completed).
/// - Every [`ConnectionHandler`] returns `false` from
/// [`ConnectionHandler::connection_keep_alive`].
///
/// Once all these conditions are true, the idle connection timeout starts ticking.
pub fn with_idle_connection_timeout(mut self, timeout: Duration) -> Self {
Expand Down
2 changes: 1 addition & 1 deletion transports/dns/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ use async_trait::async_trait;
use futures::{future::BoxFuture, prelude::*};
pub use hickory_resolver::{
config::{ResolverConfig, ResolverOpts},
{ResolveError, ResolveErrorKind},
ResolveError, ResolveErrorKind,
};
use hickory_resolver::{
lookup::{Ipv4Lookup, Ipv6Lookup, TxtLookup},
Expand Down

0 comments on commit 577036a

Please sign in to comment.