Skip to content

Commit 577036a

Browse files
authored
chore: fix format with nightly
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.
1 parent ebc01e6 commit 577036a

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

libp2p/src/builder/phase.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,22 @@ mod websocket;
1616

1717
use bandwidth_logging::*;
1818
use bandwidth_metrics::*;
19+
pub use behaviour::BehaviourError;
1920
use behaviour::*;
2021
use build::*;
2122
use dns::*;
2223
use libp2p_core::{muxing::StreamMuxerBox, Transport};
2324
use libp2p_identity::Keypair;
25+
pub use other_transport::TransportError;
2426
use other_transport::*;
2527
use provider::*;
2628
use quic::*;
2729
use relay::*;
2830
use swarm::*;
2931
use tcp::*;
30-
use websocket::*;
31-
32-
pub use behaviour::BehaviourError;
33-
pub use other_transport::TransportError;
3432
#[cfg(all(not(target_arch = "wasm32"), feature = "websocket"))]
3533
pub use websocket::WebsocketError;
34+
use websocket::*;
3635

3736
use super::{
3837
select_muxer::SelectMuxerUpgrade, select_security::SelectSecurityUpgrade, SwarmBuilder,

swarm/src/lib.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,14 +1497,17 @@ impl Config {
14971497
///
14981498
/// Defaults to 10s.
14991499
///
1500-
/// Typically, you shouldn't _need_ to modify this default as connections will be kept alive whilst they are "in use" (see below).
1501-
/// Depending on the application's usecase, it may be desirable to keep connections alive despite them not being in use.
1500+
/// Typically, you shouldn't _need_ to modify this default as connections will be kept alive
1501+
/// whilst they are "in use" (see below). Depending on the application's usecase, it may be
1502+
/// desirable to keep connections alive despite them not being in use.
15021503
///
15031504
/// A connection is considered idle if:
15041505
/// - There are no active inbound streams.
15051506
/// - There are no active outbounds streams.
1506-
/// - There are no pending outbound streams (i.e. all streams requested via [`ConnectionHandlerEvent::OutboundSubstreamRequest`] have completed).
1507-
/// - Every [`ConnectionHandler`] returns `false` from [`ConnectionHandler::connection_keep_alive`].
1507+
/// - There are no pending outbound streams (i.e. all streams requested via
1508+
/// [`ConnectionHandlerEvent::OutboundSubstreamRequest`] have completed).
1509+
/// - Every [`ConnectionHandler`] returns `false` from
1510+
/// [`ConnectionHandler::connection_keep_alive`].
15081511
///
15091512
/// Once all these conditions are true, the idle connection timeout starts ticking.
15101513
pub fn with_idle_connection_timeout(mut self, timeout: Duration) -> Self {

transports/dns/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ use async_trait::async_trait;
160160
use futures::{future::BoxFuture, prelude::*};
161161
pub use hickory_resolver::{
162162
config::{ResolverConfig, ResolverOpts},
163-
{ResolveError, ResolveErrorKind},
163+
ResolveError, ResolveErrorKind,
164164
};
165165
use hickory_resolver::{
166166
lookup::{Ipv4Lookup, Ipv6Lookup, TxtLookup},

0 commit comments

Comments
 (0)