diff --git a/core/src/transport.rs b/core/src/transport.rs index 22e7a0532fa..db8c083bd0a 100644 --- a/core/src/transport.rs +++ b/core/src/transport.rs @@ -311,7 +311,7 @@ pub enum TransportEvent { impl TransportEvent { /// In case this [`TransportEvent`] is an upgrade, apply the given function - /// to the upgrade and produce another transport event based the the function's result. + /// to the upgrade and produce another transport event based the function's result. pub fn map_upgrade(self, map: impl FnOnce(TUpgr) -> U) -> TransportEvent { match self { TransportEvent::Incoming { @@ -530,7 +530,7 @@ pub enum TransportError { } impl TransportError { - /// Applies a function to the the error in [`TransportError::Other`]. + /// Applies a function to the error in [`TransportError::Other`]. pub fn map(self, map: impl FnOnce(TErr) -> TNewErr) -> TransportError { match self { TransportError::MultiaddrNotSupported(addr) => { diff --git a/deny.toml b/deny.toml index 6634887128e..dedcb7a3a95 100644 --- a/deny.toml +++ b/deny.toml @@ -37,7 +37,7 @@ ignore = [ [licenses] # The lint level for crates which do not have a detectable license unlicensed = "deny" -# List of explictly allowed licenses +# List of explicitly allowed licenses # See https://spdx.org/licenses/ for list of possible licenses # [possible values: any SPDX 3.7 short identifier (+ optional exception)]. allow = [ @@ -46,7 +46,7 @@ allow = [ "MIT", "Unlicense", ] -# List of explictly disallowed licenses +# List of explicitly disallowed licenses # See https://spdx.org/licenses/ for list of possible licenses # [possible values: any SPDX 3.7 short identifier (+ optional exception)]. deny = [] diff --git a/examples/stream/README.md b/examples/stream/README.md index 8437a5ea21e..3b0325519f7 100644 --- a/examples/stream/README.md +++ b/examples/stream/README.md @@ -23,7 +23,7 @@ To run the example, follow these steps: cargo run --bin stream-example --
``` -3. Both terminals should now continuosly print messages. +3. Both terminals should now continuously print messages. ## Conclusion diff --git a/identity/src/secp256k1.rs b/identity/src/secp256k1.rs index 5e1fda2933b..a6e9e923268 100644 --- a/identity/src/secp256k1.rs +++ b/identity/src/secp256k1.rs @@ -214,7 +214,7 @@ impl PublicKey { self.0.serialize() } - /// Decode a public key from a byte slice in the the format produced + /// Decode a public key from a byte slice in the format produced /// by `encode`. pub fn try_from_bytes(k: &[u8]) -> Result { libsecp256k1::PublicKey::parse_slice(k, Some(libsecp256k1::PublicKeyFormat::Compressed)) diff --git a/protocols/gossipsub/src/behaviour/tests.rs b/protocols/gossipsub/src/behaviour/tests.rs index 1a63b52541f..077a1bd22fb 100644 --- a/protocols/gossipsub/src/behaviour/tests.rs +++ b/protocols/gossipsub/src/behaviour/tests.rs @@ -2392,7 +2392,7 @@ fn test_dont_graft_to_negative_scored_peers() { } ///Note that in this test also without a penalty the px would be ignored because of the -/// acceptPXThreshold, but the spec still explicitely states the rule that px from negative +/// acceptPXThreshold, but the spec still explicitly states the rule that px from negative /// peers should get ignored, therefore we test it here. #[test] fn test_ignore_px_from_negative_scored_peer() { diff --git a/protocols/gossipsub/src/config.rs b/protocols/gossipsub/src/config.rs index cd2326279eb..8d7d11802ad 100644 --- a/protocols/gossipsub/src/config.rs +++ b/protocols/gossipsub/src/config.rs @@ -262,9 +262,9 @@ impl Config { self.unsubscribe_backoff } - /// Number of heartbeat slots considered as slack for backoffs. This gurantees that we wait + /// Number of heartbeat slots considered as slack for backoffs. This guarantees that we wait /// at least backoff_slack heartbeats after a backoff is over before we try to graft. This - /// solves problems occuring through high latencies. In particular if + /// solves problems occurring through high latencies. In particular if /// `backoff_slack * heartbeat_interval` is longer than any latencies between processing /// prunes on our side and processing prunes on the receiving side this guarantees that we /// get not punished for too early grafting. The default is 1. @@ -660,9 +660,9 @@ impl ConfigBuilder { self } - /// Number of heartbeat slots considered as slack for backoffs. This gurantees that we wait + /// Number of heartbeat slots considered as slack for backoffs. This guarantees that we wait /// at least backoff_slack heartbeats after a backoff is over before we try to graft. This - /// solves problems occuring through high latencies. In particular if + /// solves problems occurring through high latencies. In particular if /// `backoff_slack * heartbeat_interval` is longer than any latencies between processing /// prunes on our side and processing prunes on the receiving side this guarantees that we /// get not punished for too early grafting. The default is 1. diff --git a/protocols/kad/src/behaviour.rs b/protocols/kad/src/behaviour.rs index 0ebde252fc6..9a7dacfdfb1 100644 --- a/protocols/kad/src/behaviour.rs +++ b/protocols/kad/src/behaviour.rs @@ -2203,7 +2203,7 @@ where Some(peer) => peer, }; - // We should order addresses from decreasing likelyhood of connectivity, so start with + // We should order addresses from decreasing likelihood of connectivity, so start with // the addresses of that peer in the k-buckets. let key = kbucket::Key::from(peer_id); let mut peer_addrs = diff --git a/protocols/kad/src/kbucket.rs b/protocols/kad/src/kbucket.rs index cf5591c5cf6..5a110fd7c3f 100644 --- a/protocols/kad/src/kbucket.rs +++ b/protocols/kad/src/kbucket.rs @@ -344,7 +344,7 @@ enum ClosestBucketsIterState { /// The starting state of the iterator yields the first bucket index and /// then transitions to `ZoomIn`. Start(BucketIndex), - /// The iterator "zooms in" to to yield the next bucket cotaining nodes that + /// The iterator "zooms in" to yield the next bucket cotaining nodes that /// are incrementally closer to the local node but further from the `target`. /// These buckets are identified by a `1` in the corresponding bit position /// of the distance bit string. When bucket `0` is reached, the iterator diff --git a/swarm/src/connection.rs b/swarm/src/connection.rs index a6e8e1c6851..c701f1773e6 100644 --- a/swarm/src/connection.rs +++ b/swarm/src/connection.rs @@ -717,7 +717,7 @@ impl Future for SubstreamRequested { /// The options for a planned connection & handler shutdown. /// -/// A shutdown is planned anew based on the the return value of +/// A shutdown is planned anew based on the return value of /// [`ConnectionHandler::connection_keep_alive`] of the underlying handler /// after every invocation of [`ConnectionHandler::poll`]. /// diff --git a/transports/websocket/src/framed.rs b/transports/websocket/src/framed.rs index 584bb2b5058..ab7bfda43db 100644 --- a/transports/websocket/src/framed.rs +++ b/transports/websocket/src/framed.rs @@ -521,7 +521,7 @@ fn parse_ws_dial_addr(addr: Multiaddr) -> Result> { }; // The original address, stripped of the `/ws` and `/wss` protocols, - // makes up the the address for the inner TCP-based transport. + // makes up the address for the inner TCP-based transport. let tcp_addr = match p2p { Some(p) => protocols.with(p), None => protocols,