Skip to content

Commit

Permalink
docs: fix typos in some comments
Browse files Browse the repository at this point in the history
fix typos in some comments

Pull-Request: #5338.
  • Loading branch information
largemouth authored Apr 25, 2024
1 parent cf7b678 commit 2dcdda4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/src/transport/dummy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl<TOut> Transport for DummyTransport<TOut> {
}
}

/// Implementation of `AsyncRead` and `AsyncWrite`. Not meant to be instanciated.
/// Implementation of `AsyncRead` and `AsyncWrite`. Not meant to be instantiated.
pub struct DummyStream(());

impl fmt::Debug for DummyStream {
Expand Down
4 changes: 2 additions & 2 deletions protocols/gossipsub/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ impl Config {
self.mesh_outbound_min
}

/// Number of heartbeat ticks that specifcy the interval in which opportunistic grafting is
/// Number of heartbeat ticks that specify 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>).
Expand Down Expand Up @@ -694,7 +694,7 @@ impl ConfigBuilder {
self
}

/// Number of heartbeat ticks that specifcy the interval in which opportunistic grafting is
/// Number of heartbeat ticks that specify 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>).
Expand Down
2 changes: 1 addition & 1 deletion protocols/kad/src/kbucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 yield the next bucket cotaining nodes that
/// The iterator "zooms in" to yield the next bucket containing 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
Expand Down
2 changes: 1 addition & 1 deletion protocols/kad/src/kbucket/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.

//! The `Entry` API for quering and modifying the entries of a `KBucketsTable`
//! The `Entry` API for querying and modifying the entries of a `KBucketsTable`
//! representing the nodes participating in the Kademlia DHT.
pub(crate) use super::bucket::{AppliedPending, InsertResult, Node, K_VALUE};
Expand Down
2 changes: 1 addition & 1 deletion protocols/rendezvous/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ impl Registrations {
match (discover_namespace.as_ref(), cookie_namespace) {
// discover all namespace but cookie is specific to a namespace? => bad
(None, Some(_)) => return Err(CookieNamespaceMismatch),
// discover for a namespace but cookie is for a different namesapce? => bad
// discover for a namespace but cookie is for a different namespace? => bad
(Some(namespace), Some(cookie_namespace)) if namespace != cookie_namespace => {
return Err(CookieNamespaceMismatch)
}
Expand Down

0 comments on commit 2dcdda4

Please sign in to comment.