Fix some typos. (#620)
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user