Skip to content

Commit a1c3570

Browse files
authored
docs: Fix typos
1 parent 779b391 commit a1c3570

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/no_std.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,22 @@ impl<T> crate::Inner<T> {
7070
pub(crate) fn remove(
7171
&self,
7272
mut listener: Pin<&mut Option<Listener<T>>>,
73-
propogate: bool,
73+
propagate: bool,
7474
) -> Option<State<T>> {
7575
let state = match listener.as_mut().take() {
7676
Some(Listener::HasNode(key)) => {
7777
match self.try_lock() {
7878
Some(mut list) => {
7979
// Fast path removal.
80-
list.remove(key, propogate)
80+
list.remove(key, propagate)
8181
}
8282

8383
None => {
8484
// Slow path removal.
8585
// This is why intrusive lists don't work on no_std.
8686
let node = Node::RemoveListener {
8787
listener: key,
88-
propagate: propogate,
88+
propagate,
8989
};
9090

9191
self.list.queue.push(node);
@@ -500,7 +500,7 @@ impl<T> ListenerSlab<T> {
500500
}
501501

502502
/// Removes an entry from the list and returns its state.
503-
pub(crate) fn remove(&mut self, key: NonZeroUsize, propogate: bool) -> Option<State<T>> {
503+
pub(crate) fn remove(&mut self, key: NonZeroUsize, propagate: bool) -> Option<State<T>> {
504504
let entry = &self.listeners[key.get()];
505505
let prev = entry.prev().get();
506506
let next = entry.next().get();
@@ -538,8 +538,8 @@ impl<T> ListenerSlab<T> {
538538
if state.is_notified() {
539539
self.notified = self.notified.saturating_sub(1);
540540

541-
if propogate {
542-
// Propogate the notification to the next entry.
541+
if propagate {
542+
// Propagate the notification to the next entry.
543543
let state = mem::replace(&mut state, State::NotifiedTaken);
544544
if let State::Notified { tag, additional } = state {
545545
let tags = {
@@ -1247,7 +1247,7 @@ mod tests {
12471247
}
12481248
);
12491249

1250-
// Remove and propogate the second listener.
1250+
// Remove and propagate the second listener.
12511251
assert_eq!(listeners.remove(key2, true), Some(State::NotifiedTaken));
12521252

12531253
// The third listener should be notified.
@@ -1339,7 +1339,7 @@ mod tests {
13391339
inner.notify(GenericNotify::new(1, false, || ()));
13401340
assert!(woken.load(Ordering::SeqCst));
13411341

1342-
// Remove the second listener and propogate the notification.
1342+
// Remove the second listener and propagate the notification.
13431343
assert_eq!(
13441344
inner.remove(Pin::new(&mut listener2), true),
13451345
Some(State::NotifiedTaken)

src/notify.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ impl<T, F: FnMut() -> T> TagProducer for F {
342342
/// This trait is implemented for all types that implement [`Notification`], as well as for non-floating-point
343343
/// numeric literals (`usize`, `i32`, etc).
344344
///
345-
/// This function can be thought of as being analagous to [`std::iter::IntoIterator`], but for [`Notification`].
345+
/// This function can be thought of as being analogous to [`std::iter::IntoIterator`], but for [`Notification`].
346346
pub trait IntoNotification: __private::Sealed {
347347
/// The tag data associated with a notification.
348348
///

src/std.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ impl<T> crate::Inner<T> {
103103
pub(crate) fn remove(
104104
&self,
105105
listener: Pin<&mut Option<Listener<T>>>,
106-
propogate: bool,
106+
propagate: bool,
107107
) -> Option<State<T>> {
108-
self.lock().remove(listener, propogate)
108+
self.lock().remove(listener, propagate)
109109
}
110110

111111
/// Notifies a number of entries.
@@ -169,7 +169,7 @@ impl<T> Inner<T> {
169169
fn remove(
170170
&mut self,
171171
mut listener: Pin<&mut Option<Listener<T>>>,
172-
propogate: bool,
172+
propagate: bool,
173173
) -> Option<State<T>> {
174174
let entry = unsafe {
175175
// SAFETY: We never move out the `link` field.
@@ -219,7 +219,7 @@ impl<T> Inner<T> {
219219
if state.is_notified() {
220220
self.notified -= 1;
221221

222-
if propogate {
222+
if propagate {
223223
let state = mem::replace(&mut state, State::NotifiedTaken);
224224
if let State::Notified { additional, tag } = state {
225225
let tags = {

0 commit comments

Comments
 (0)