Skip to content

Commit

Permalink
chore: fix spelling mistakes (#4858)
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
  • Loading branch information
jsoref committed Jul 25, 2022
1 parent 94a7eae commit f3e340a
Show file tree
Hide file tree
Showing 26 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/stress-test.yml
Expand Up @@ -12,7 +12,7 @@ env:
rust_stable: stable

jobs:
stess-test:
stress-test:
name: Stress Test
runs-on: ubuntu-latest
strategy:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -562,7 +562,7 @@ Tokio ≥1.0.0 comes with LTS guarantees:

The goal of these guarantees is to provide stability to the ecosystem.

## Mininum Supported Rust Version (MSRV)
## Minimum Supported Rust Version (MSRV)

* All Tokio ≥1.0.0 releases will support at least a 6-month old Rust
compiler release.
Expand Down
8 changes: 4 additions & 4 deletions SECURITY.md
@@ -1,13 +1,13 @@
## Report a security issue

The Tokio project team welcomes security reports and is committed to providing prompt attention to security issues. Security issues should be reported privately via [security@tokio.rs](mailto:security@tokio.rs). Security issues should not be reported via the public Github Issue tracker.
The Tokio project team welcomes security reports and is committed to providing prompt attention to security issues. Security issues should be reported privately via [security@tokio.rs](mailto:security@tokio.rs). Security issues should not be reported via the public GitHub Issue tracker.

## Vulnerability coordination

Remediation of security vulnerabilities is prioritized by the project team. The project team coordinates remediation with third-party project stakeholders via [Github Security Advisories](https://help.github.com/en/github/managing-security-vulnerabilities/about-github-security-advisories). Third-party stakeholders may include the reporter of the issue, affected direct or indirect users of Tokio, and maintainers of upstream dependencies if applicable.
Remediation of security vulnerabilities is prioritized by the project team. The project team coordinates remediation with third-party project stakeholders via [GitHub Security Advisories](https://help.github.com/en/github/managing-security-vulnerabilities/about-github-security-advisories). Third-party stakeholders may include the reporter of the issue, affected direct or indirect users of Tokio, and maintainers of upstream dependencies if applicable.

Downstream project maintainers and Tokio users can request participation in coordination of applicable security issues by sending your contact email address, Github username(s) and any other salient information to [security@tokio.rs](mailto:security@tokio.rs). Participation in security issue coordination processes is at the discretion of the Tokio team.
Downstream project maintainers and Tokio users can request participation in coordination of applicable security issues by sending your contact email address, GitHub username(s) and any other salient information to [security@tokio.rs](mailto:security@tokio.rs). Participation in security issue coordination processes is at the discretion of the Tokio team.

## Security advisories

The project team is committed to transparency in the security issue disclosure process. The Tokio team announces security issues via [project Github Release notes](https://github.com/tokio-rs/tokio/releases) and the [RustSec advisory database](https://github.com/RustSec/advisory-db) (i.e. `cargo-audit`).
The project team is committed to transparency in the security issue disclosure process. The Tokio team announces security issues via [project GitHub Release notes](https://github.com/tokio-rs/tokio/releases) and the [RustSec advisory database](https://github.com/RustSec/advisory-db) (i.e. `cargo-audit`).
2 changes: 1 addition & 1 deletion tokio-test/src/macros.rs
Expand Up @@ -260,7 +260,7 @@ macro_rules! assert_err {
}};
}

/// Asserts that an exact duration has elapsed since since the start instant ±1ms.
/// Asserts that an exact duration has elapsed since the start instant ±1ms.
///
/// ```rust
/// use tokio::time::{self, Instant};
Expand Down
4 changes: 2 additions & 2 deletions tokio-util/src/sync/cancellation_token/tree_node.rs
Expand Up @@ -200,7 +200,7 @@ where
/// `parent` MUST have been a parent of the node when they both got locked,
/// otherwise there is a potential for a deadlock as invariant #2 would be violated.
///
/// To aquire the locks for node and parent, use [with_locked_node_and_parent].
/// To acquire the locks for node and parent, use [with_locked_node_and_parent].
fn move_children_to_parent(node: &mut Inner, parent: &mut Inner) {
// Pre-allocate in the parent, for performance
parent.children.reserve(node.children.len());
Expand All @@ -218,7 +218,7 @@ fn move_children_to_parent(node: &mut Inner, parent: &mut Inner) {
/// Removes a child from the parent.
///
/// `parent` MUST be the parent of `node`.
/// To aquire the locks for node and parent, use [with_locked_node_and_parent].
/// To acquire the locks for node and parent, use [with_locked_node_and_parent].
fn remove_child(parent: &mut Inner, mut node: MutexGuard<'_, Inner>) {
// Query the position from where to remove a node
let pos = node.parent_idx;
Expand Down
2 changes: 1 addition & 1 deletion tokio-util/src/sync/tests/loom_cancellation_token.rs
Expand Up @@ -80,7 +80,7 @@ fn drop_token_no_child() {
}

#[test]
fn drop_token_with_childs() {
fn drop_token_with_children() {
loom::model(|| {
let token1 = CancellationToken::new();
let child_token1 = token1.child_token();
Expand Down
2 changes: 1 addition & 1 deletion tokio-util/src/time/delay_queue.rs
Expand Up @@ -190,7 +190,7 @@ impl<T> SlabStorage<T> {
let key_contained = self.key_map.contains_key(&key.into());

if key_contained {
// It's possible that a `compact` call creates capacitiy in `self.inner` in
// It's possible that a `compact` call creates capacity in `self.inner` in
// such a way that a `self.inner.insert` call creates a `key` which was
// previously given out during an `insert` call prior to the `compact` call.
// If `key` is contained in `self.key_map`, we have encountered this exact situation,
Expand Down
2 changes: 1 addition & 1 deletion tokio-util/tests/framed_write.rs
Expand Up @@ -130,7 +130,7 @@ fn write_hits_backpressure() {
_ => unreachable!(),
}

// Push a new new chunk
// Push a new chunk
mock.calls.push_back(Ok(b[..].to_vec()));
}
// 1 'wouldblock', 4 * 2KB buffers, 1 b-byte buffer
Expand Down
14 changes: 7 additions & 7 deletions tokio-util/tests/sync_cancellation_token.rs
Expand Up @@ -258,7 +258,7 @@ fn cancel_only_all_descendants() {
let child2_token = token.child_token();
let grandchild_token = child1_token.child_token();
let grandchild2_token = child1_token.child_token();
let grandgrandchild_token = grandchild_token.child_token();
let great_grandchild_token = grandchild_token.child_token();

assert!(!parent_token.is_cancelled());
assert!(!token.is_cancelled());
Expand All @@ -267,7 +267,7 @@ fn cancel_only_all_descendants() {
assert!(!child2_token.is_cancelled());
assert!(!grandchild_token.is_cancelled());
assert!(!grandchild2_token.is_cancelled());
assert!(!grandgrandchild_token.is_cancelled());
assert!(!great_grandchild_token.is_cancelled());

let parent_fut = parent_token.cancelled();
let fut = token.cancelled();
Expand All @@ -276,7 +276,7 @@ fn cancel_only_all_descendants() {
let child2_fut = child2_token.cancelled();
let grandchild_fut = grandchild_token.cancelled();
let grandchild2_fut = grandchild2_token.cancelled();
let grandgrandchild_fut = grandgrandchild_token.cancelled();
let great_grandchild_fut = great_grandchild_token.cancelled();

pin!(parent_fut);
pin!(fut);
Expand All @@ -285,7 +285,7 @@ fn cancel_only_all_descendants() {
pin!(child2_fut);
pin!(grandchild_fut);
pin!(grandchild2_fut);
pin!(grandgrandchild_fut);
pin!(great_grandchild_fut);

assert_eq!(
Poll::Pending,
Expand Down Expand Up @@ -321,7 +321,7 @@ fn cancel_only_all_descendants() {
);
assert_eq!(
Poll::Pending,
grandgrandchild_fut
great_grandchild_fut
.as_mut()
.poll(&mut Context::from_waker(&waker))
);
Expand All @@ -339,7 +339,7 @@ fn cancel_only_all_descendants() {
assert!(child2_token.is_cancelled());
assert!(grandchild_token.is_cancelled());
assert!(grandchild2_token.is_cancelled());
assert!(grandgrandchild_token.is_cancelled());
assert!(great_grandchild_token.is_cancelled());

assert_eq!(
Poll::Ready(()),
Expand Down Expand Up @@ -367,7 +367,7 @@ fn cancel_only_all_descendants() {
);
assert_eq!(
Poll::Ready(()),
grandgrandchild_fut
great_grandchild_fut
.as_mut()
.poll(&mut Context::from_waker(&waker))
);
Expand Down
6 changes: 3 additions & 3 deletions tokio/docs/reactor-refactor.md
Expand Up @@ -188,9 +188,9 @@ readiness, the driver's tick is packed into the atomic `usize`.
The `ScheduledIo` readiness `AtomicUsize` is structured as:

```
| reserved | generation | driver tick | readinesss |
|----------+------------+--------------+------------|
| 1 bit | 7 bits + 8 bits + 16 bits |
| reserved | generation | driver tick | readiness |
|----------+------------+--------------+-----------|
| 1 bit | 7 bits + 8 bits + 16 bits |
```

The `reserved` and `generation` components exist today.
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/coop.rs
Expand Up @@ -215,7 +215,7 @@ mod test {
}

#[test]
fn bugeting() {
fn budgeting() {
use futures::future::poll_fn;
use tokio_test::*;

Expand Down
2 changes: 1 addition & 1 deletion tokio/src/runtime/builder.rs
Expand Up @@ -738,7 +738,7 @@ impl Builder {
/// * `UnhandledPanic::ShutdownRuntime` will force the runtime to
/// shutdown immediately when a spawned task panics even if that
/// task's `JoinHandle` has not been dropped. All other spawned tasks
/// will immediatetly terminate and further calls to
/// will immediately terminate and further calls to
/// [`Runtime::block_on`] will panic.
///
/// # Unstable
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/runtime/metrics/runtime.rs
Expand Up @@ -131,7 +131,7 @@ impl RuntimeMetrics {
///
/// `worker` is the index of the worker being queried. The given value must
/// be between 0 and `num_workers()`. The index uniquely identifies a single
/// worker and will continue to indentify the worker throughout the lifetime
/// worker and will continue to identify the worker throughout the lifetime
/// of the runtime instance.
///
/// # Panics
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/runtime/task/mod.rs
Expand Up @@ -369,7 +369,7 @@ cfg_rt_multi_thread! {
}

impl<S: Schedule> Task<S> {
/// Pre-emptively cancels the task as part of the shutdown process.
/// Preemptively cancels the task as part of the shutdown process.
pub(crate) fn shutdown(self) {
let raw = self.raw;
mem::forget(self);
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/runtime/task/waker.rs
Expand Up @@ -13,7 +13,7 @@ pub(super) struct WakerRef<'a, S: 'static> {
_p: PhantomData<(&'a Header, S)>,
}

/// Returns a `WakerRef` which avoids having to pre-emptively increase the
/// Returns a `WakerRef` which avoids having to preemptively increase the
/// refcount if there is no need to do so.
pub(super) fn waker_ref<T, S>(header: &NonNull<Header>) -> WakerRef<'_, S>
where
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/sync/watch.rs
Expand Up @@ -665,7 +665,7 @@ impl<T> Sender<T> {
///
/// The `modify` closure must return `true` if the value has actually
/// been modified during the mutable borrow. It should only return `false`
/// if the value is guaranteed to be unnmodified despite the mutable
/// if the value is guaranteed to be unmodified despite the mutable
/// borrow.
///
/// Receivers are only notified if the closure returned `true`. If the
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/task/consume_budget.rs
Expand Up @@ -4,7 +4,7 @@ use std::task::Poll;
/// runtime *if* the task's coop budget was exhausted.
///
/// The task will only yield if its entire coop budget has been exhausted.
/// This function can can be used in order to insert optional yield points into long
/// This function can be used in order to insert optional yield points into long
/// computations that do not use Tokio resources like sockets or semaphores,
/// without redundantly yielding to the runtime each time.
///
Expand Down
4 changes: 2 additions & 2 deletions tokio/src/task/local.rs
Expand Up @@ -160,7 +160,7 @@ cfg_rt! {
/// tokio::task::spawn_local(run_task(new_task));
/// }
/// // If the while loop returns, then all the LocalSpawner
/// // objects have have been dropped.
/// // objects have been dropped.
/// });
///
/// // This will return once all senders are dropped and all
Expand Down Expand Up @@ -652,7 +652,7 @@ cfg_unstable! {
/// * `UnhandledPanic::ShutdownRuntime` will force the `LocalSet` to
/// shutdown immediately when a spawned task panics even if that
/// task's `JoinHandle` has not been dropped. All other spawned tasks
/// will immediatetly terminate and further calls to
/// will immediately terminate and further calls to
/// [`LocalSet::block_on`] and [`LocalSet::run_until`] will panic.
///
/// # Panics
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/time/driver/entry.rs
Expand Up @@ -36,7 +36,7 @@
//! point than it was originally scheduled for.
//!
//! This is accomplished by lazily rescheduling timers. That is, we update the
//! state field field with the true expiration of the timer from the holder of
//! state field with the true expiration of the timer from the holder of
//! the [`TimerEntry`]. When the driver services timers (ie, whenever it's
//! walking lists of timers), it checks this "true when" value, and reschedules
//! based on it.
Expand Down
8 changes: 4 additions & 4 deletions tokio/src/time/driver/tests/mod.rs
Expand Up @@ -291,11 +291,11 @@ fn balanced_incr_and_decr() {
let incr_inner = inner.clone();
let decr_inner = inner.clone();
let incr_hndle = thread::spawn(move || incr(incr_inner));
let decr_hndle = thread::spawn(move || decr(decr_inner));
let incr_handle = thread::spawn(move || incr(incr_inner));
let decr_handle = thread::spawn(move || decr(decr_inner));
incr_hndle.join().expect("should never fail");
decr_hndle.join().expect("should never fail");
incr_handle.join().expect("should never fail");
decr_handle.join().expect("should never fail");
assert_eq!(inner.num(Ordering::SeqCst), 0);
})
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/time/interval.rs
Expand Up @@ -278,7 +278,7 @@ pub enum MissedTickBehavior {
/// // 50ms after the call to `tick` up above. That is, in `tick`, when we
/// // recognize that we missed a tick, we schedule the next tick to happen
/// // 50ms (or whatever the `period` is) from right then, not from when
/// // were were *supposed* to tick
/// // were *supposed* to tick
/// interval.tick().await;
/// # }
/// ```
Expand Down
2 changes: 1 addition & 1 deletion tokio/tests/macros_join.rs
Expand Up @@ -86,7 +86,7 @@ async fn non_cooperative_task(permits: Arc<Semaphore>) -> usize {
let mut exceeded_budget = 0;

for _ in 0..5 {
// Another task should run after after this task uses its whole budget
// Another task should run after this task uses its whole budget
for _ in 0..128 {
let _permit = permits.clone().acquire_owned().await.unwrap();
}
Expand Down
2 changes: 1 addition & 1 deletion tokio/tests/macros_try_join.rs
Expand Up @@ -114,7 +114,7 @@ async fn non_cooperative_task(permits: Arc<Semaphore>) -> Result<usize, String>
let mut exceeded_budget = 0;

for _ in 0..5 {
// Another task should run after after this task uses its whole budget
// Another task should run after this task uses its whole budget
for _ in 0..128 {
let _permit = permits.clone().acquire_owned().await.unwrap();
}
Expand Down
2 changes: 1 addition & 1 deletion tokio/tests/rt_common.rs
Expand Up @@ -1137,7 +1137,7 @@ rt_test! {
let (spawned_tx, mut spawned_rx) = mpsc::unbounded_channel();

let mut tasks = vec![];
// Spawn a bunch of tasks that ping ping between each other to
// Spawn a bunch of tasks that ping-pong between each other to
// saturate the runtime.
for _ in 0..NUM {
let (tx1, mut rx1) = mpsc::unbounded_channel();
Expand Down
2 changes: 1 addition & 1 deletion tokio/tests/sync_semaphore.rs
Expand Up @@ -65,7 +65,7 @@ fn forget() {

#[tokio::test]
#[cfg(feature = "full")]
async fn stresstest() {
async fn stress_test() {
let sem = Arc::new(Semaphore::new(5));
let mut join_handles = Vec::new();
for _ in 0..1000 {
Expand Down
2 changes: 1 addition & 1 deletion tokio/tests/sync_semaphore_owned.rs
Expand Up @@ -91,7 +91,7 @@ fn forget() {

#[tokio::test]
#[cfg(feature = "full")]
async fn stresstest() {
async fn stress_test() {
let sem = Arc::new(Semaphore::new(5));
let mut join_handles = Vec::new();
for _ in 0..1000 {
Expand Down

0 comments on commit f3e340a

Please sign in to comment.