Skip to content

Commit b890b29

Browse files
authored
docs: fix typos in some comments
The same as #5196 There are some problem when merging #5196, resubmit this mr. Pull-Request: #5255.
1 parent 404a622 commit b890b29

File tree

10 files changed

+15
-15
lines changed

10 files changed

+15
-15
lines changed

core/src/transport.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ pub enum TransportEvent<TUpgr, TErr> {
311311

312312
impl<TUpgr, TErr> TransportEvent<TUpgr, TErr> {
313313
/// In case this [`TransportEvent`] is an upgrade, apply the given function
314-
/// to the upgrade and produce another transport event based the the function's result.
314+
/// to the upgrade and produce another transport event based the function's result.
315315
pub fn map_upgrade<U>(self, map: impl FnOnce(TUpgr) -> U) -> TransportEvent<U, TErr> {
316316
match self {
317317
TransportEvent::Incoming {
@@ -530,7 +530,7 @@ pub enum TransportError<TErr> {
530530
}
531531

532532
impl<TErr> TransportError<TErr> {
533-
/// Applies a function to the the error in [`TransportError::Other`].
533+
/// Applies a function to the error in [`TransportError::Other`].
534534
pub fn map<TNewErr>(self, map: impl FnOnce(TErr) -> TNewErr) -> TransportError<TNewErr> {
535535
match self {
536536
TransportError::MultiaddrNotSupported(addr) => {

deny.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ignore = [
3737
[licenses]
3838
# The lint level for crates which do not have a detectable license
3939
unlicensed = "deny"
40-
# List of explictly allowed licenses
40+
# List of explicitly allowed licenses
4141
# See https://spdx.org/licenses/ for list of possible licenses
4242
# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
4343
allow = [
@@ -46,7 +46,7 @@ allow = [
4646
"MIT",
4747
"Unlicense",
4848
]
49-
# List of explictly disallowed licenses
49+
# List of explicitly disallowed licenses
5050
# See https://spdx.org/licenses/ for list of possible licenses
5151
# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
5252
deny = []

examples/stream/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To run the example, follow these steps:
2323
cargo run --bin stream-example -- <address>
2424
```
2525

26-
3. Both terminals should now continuosly print messages.
26+
3. Both terminals should now continuously print messages.
2727

2828
## Conclusion
2929

identity/src/secp256k1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ impl PublicKey {
214214
self.0.serialize()
215215
}
216216

217-
/// Decode a public key from a byte slice in the the format produced
217+
/// Decode a public key from a byte slice in the format produced
218218
/// by `encode`.
219219
pub fn try_from_bytes(k: &[u8]) -> Result<PublicKey, DecodingError> {
220220
libsecp256k1::PublicKey::parse_slice(k, Some(libsecp256k1::PublicKeyFormat::Compressed))

protocols/gossipsub/src/behaviour/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2392,7 +2392,7 @@ fn test_dont_graft_to_negative_scored_peers() {
23922392
}
23932393

23942394
///Note that in this test also without a penalty the px would be ignored because of the
2395-
/// acceptPXThreshold, but the spec still explicitely states the rule that px from negative
2395+
/// acceptPXThreshold, but the spec still explicitly states the rule that px from negative
23962396
/// peers should get ignored, therefore we test it here.
23972397
#[test]
23982398
fn test_ignore_px_from_negative_scored_peer() {

protocols/gossipsub/src/config.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ impl Config {
262262
self.unsubscribe_backoff
263263
}
264264

265-
/// Number of heartbeat slots considered as slack for backoffs. This gurantees that we wait
265+
/// Number of heartbeat slots considered as slack for backoffs. This guarantees that we wait
266266
/// at least backoff_slack heartbeats after a backoff is over before we try to graft. This
267-
/// solves problems occuring through high latencies. In particular if
267+
/// solves problems occurring through high latencies. In particular if
268268
/// `backoff_slack * heartbeat_interval` is longer than any latencies between processing
269269
/// prunes on our side and processing prunes on the receiving side this guarantees that we
270270
/// get not punished for too early grafting. The default is 1.
@@ -660,9 +660,9 @@ impl ConfigBuilder {
660660
self
661661
}
662662

663-
/// Number of heartbeat slots considered as slack for backoffs. This gurantees that we wait
663+
/// Number of heartbeat slots considered as slack for backoffs. This guarantees that we wait
664664
/// at least backoff_slack heartbeats after a backoff is over before we try to graft. This
665-
/// solves problems occuring through high latencies. In particular if
665+
/// solves problems occurring through high latencies. In particular if
666666
/// `backoff_slack * heartbeat_interval` is longer than any latencies between processing
667667
/// prunes on our side and processing prunes on the receiving side this guarantees that we
668668
/// get not punished for too early grafting. The default is 1.

protocols/kad/src/behaviour.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2203,7 +2203,7 @@ where
22032203
Some(peer) => peer,
22042204
};
22052205

2206-
// We should order addresses from decreasing likelyhood of connectivity, so start with
2206+
// We should order addresses from decreasing likelihood of connectivity, so start with
22072207
// the addresses of that peer in the k-buckets.
22082208
let key = kbucket::Key::from(peer_id);
22092209
let mut peer_addrs =

protocols/kad/src/kbucket.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ enum ClosestBucketsIterState {
344344
/// The starting state of the iterator yields the first bucket index and
345345
/// then transitions to `ZoomIn`.
346346
Start(BucketIndex),
347-
/// The iterator "zooms in" to to yield the next bucket cotaining nodes that
347+
/// The iterator "zooms in" to yield the next bucket cotaining nodes that
348348
/// are incrementally closer to the local node but further from the `target`.
349349
/// These buckets are identified by a `1` in the corresponding bit position
350350
/// of the distance bit string. When bucket `0` is reached, the iterator

swarm/src/connection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ impl<UserData, Upgrade> Future for SubstreamRequested<UserData, Upgrade> {
717717

718718
/// The options for a planned connection & handler shutdown.
719719
///
720-
/// A shutdown is planned anew based on the the return value of
720+
/// A shutdown is planned anew based on the return value of
721721
/// [`ConnectionHandler::connection_keep_alive`] of the underlying handler
722722
/// after every invocation of [`ConnectionHandler::poll`].
723723
///

transports/websocket/src/framed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ fn parse_ws_dial_addr<T>(addr: Multiaddr) -> Result<WsAddress, Error<T>> {
521521
};
522522

523523
// The original address, stripped of the `/ws` and `/wss` protocols,
524-
// makes up the the address for the inner TCP-based transport.
524+
// makes up the address for the inner TCP-based transport.
525525
let tcp_addr = match p2p {
526526
Some(p) => protocols.with(p),
527527
None => protocols,

0 commit comments

Comments
 (0)