From 277be6cf81f62fe346002b278de037a4f75d7948 Mon Sep 17 00:00:00 2001 From: Cem Karan Date: Wed, 9 Dec 2020 14:50:08 -0500 Subject: [PATCH] fix: Fixed some minor spelling errors. There are a few things to note about this commit: First, the corrections use American english spellings. This affects things like 'cancelled' (British) vs. 'canceled' (American). I don't know which dictionary is being used by the project to catch spelling errors, so you may wish to revert those changes. Second, there are words in use like 'deschedule' that aren't actually in the English language or any of its dialects. However, there is no better word than that, so even if your dictionary flags it in the future, I'd suggest that you keep using it (the word makes sense to native English speakers). Finally, there are a few grammar errors that I've avoided changing as they are not spelling errors, and therefore outside of the scope of this commit. --- src/fiber/schedule.rs | 4 ++-- src/io/poll/mod.rs | 2 +- src/io/poll/poller.rs | 6 +++--- src/lib.rs | 4 ++-- src/sync/mpsc.rs | 2 +- src/sync/oneshot.rs | 4 ++-- src/time.rs | 6 +++--- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/fiber/schedule.rs b/src/fiber/schedule.rs index 0147841..83ed798 100644 --- a/src/fiber/schedule.rs +++ b/src/fiber/schedule.rs @@ -31,7 +31,7 @@ pub type SchedulerId = usize; /// If a fiber is in runnable state (e.g., not waiting for I/O events), /// the scheduler will push the fiber in it's run queue. /// When `run_once` method is called, the first fiber (i.e., future) in the queue -/// will be poped and executed (i.e., `Future::poll` method is called). +/// will be popped and executed (i.e., `Future::poll` method is called). /// If the future of a fiber moves to readied state, /// it will be removed from the scheduler. @@ -236,7 +236,7 @@ pub struct Context<'a> { fiber: &'a mut FiberState, } impl<'a> Context<'a> { - /// Returns the identifier of the current exeuction context. + /// Returns the identifier of the current execution context. pub fn context_id(&self) -> super::ContextId { (self.scheduler.id, self.fiber.fiber_id) } diff --git a/src/io/poll/mod.rs b/src/io/poll/mod.rs index a75a723..0035405 100644 --- a/src/io/poll/mod.rs +++ b/src/io/poll/mod.rs @@ -31,7 +31,7 @@ where } pub fn lock(&self) -> EventedLock { loop { - // NOTE: We assumes conflictions are very rare. + // NOTE: We assume conflicts are very rare. // (But should be refined in future releases) if let Some(inner) = self.0.try_borrow_mut() { return EventedLock(inner); diff --git a/src/io/poll/poller.rs b/src/io/poll/poller.rs index a56da4f..1b1c610 100644 --- a/src/io/poll/poller.rs +++ b/src/io/poll/poller.rs @@ -301,9 +301,9 @@ impl CancelTimeout { /// A future which will expire at the specified time instant. /// -/// If this object is dropped before expiration, the timer will be cancelled. -/// Thus, for example, the repetation of setting and canceling of -/// a timer only consumpts constant memory region. +/// If this object is dropped before expiration, the timer will be canceled. +/// Thus, for example, the repetition of setting and canceling of +/// a timer only consumes constant memory region. #[derive(Debug)] pub struct Timeout { cancel: Option, diff --git a/src/lib.rs b/src/lib.rs index 5ee973e..4d035be 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -102,7 +102,7 @@ //! let monitor = executor.spawn_monitor(future); //! let answer = executor.run_fiber(monitor).unwrap(); //! -//! // Checkes the answer. +//! // Checks the answer. //! assert_eq!(answer, Ok(55)); //! ``` //! @@ -138,7 +138,7 @@ //! // Spawns a fiber to handle the client. //! handle0.spawn(client.and_then(move |client| { //! // For simplicity, splits reading process and -//! // writing process into differrent fibers. +//! // writing process into different fibers. //! let (reader, writer) = (client.clone(), client); //! let (tx, rx) = fibers::sync::mpsc::channel(); //! diff --git a/src/sync/mpsc.rs b/src/sync/mpsc.rs index a40eaf4..020259c 100644 --- a/src/sync/mpsc.rs +++ b/src/sync/mpsc.rs @@ -141,7 +141,7 @@ pub fn sync_channel(bound: usize) -> (SyncSender, Receiver) { /// The receiving-half of a mpsc channel. /// -/// This receving stream will never fail. +/// This receiving stream will never fail. /// /// This structure can be used on both inside and outside of a fiber. pub struct Receiver { diff --git a/src/sync/oneshot.rs b/src/sync/oneshot.rs index 79b4dde..665804b 100644 --- a/src/sync/oneshot.rs +++ b/src/sync/oneshot.rs @@ -164,7 +164,7 @@ impl fmt::Debug for Receiver { /// /// // Spawns monitored fiber /// // (In practice, spawning fiber via `spawn_monitor` function is -/// // more convenient way to archieve the same result) +/// // more convenient way to achieve the same result) /// executor.spawn_fn(move || { /// // Notifies the execution have completed successfully. /// monitored.exit(Ok("succeeded") as Result<_, ()>); @@ -199,7 +199,7 @@ impl fmt::Debug for Receiver { /// /// // Spawns monitored fiber /// // (In practice, spawning fiber via `spawn_monitor` function is -/// // more convenient way to archieve the same result) +/// // more convenient way to achieve the same result) /// executor.spawn_fn(move || { /// let _ = monitored; // This fiber owns `monitored` /// Ok(()) // Terminated before calling `Monitored::exit` method diff --git a/src/time.rs b/src/time.rs index 4b9cff7..9041d8a 100644 --- a/src/time.rs +++ b/src/time.rs @@ -47,9 +47,9 @@ pub mod timer { /// A future which will expire at the specified time instant. /// - /// If this object is dropped before expiration, the timer will be cancelled. - /// Thus, for example, the repetation of setting and canceling of - /// a timer only consumpts constant memory region. + /// If this object is dropped before expiration, the timer will be canceled. + /// Thus, for example, the repetition of setting and canceling of + /// a timer only consumes constant memory region. #[derive(Debug)] pub struct Timeout { start: time::Instant,