Fix some typos. (#620)

This commit is contained in:
Bruce Mitchener
2024-05-05 16:41:38 +06:30
committed by GitHub
parent 1b05b2ebfa
commit 7375a691e2
16 changed files with 20 additions and 20 deletions

View File

@@ -370,7 +370,7 @@ impl<N, E> Graph<N, E> {
// indices.
let edge = self.edges.swap_remove(e.index());
let swap = match self.edges.get(e.index()) {
// no elment needed to be swapped.
// no element needed to be swapped.
None => return Some(edge.weight),
Some(ed) => ed.node,
};

View File

@@ -103,7 +103,7 @@ impl<T> PubSub<T> {
subscription
}
/// Read the i-th message not yet read by the given subsciber.
/// Read the i-th message not yet read by the given subscriber.
pub fn read_ith(&self, sub: &Subscription<T>, i: usize) -> Option<&T> {
let cursor = &self.cursors[sub.id as usize];
self.messages.get(cursor.next(self.deleted_messages) + i)