From 7b57210d1e90d7e14b1b7bd33e4d7f879f533232 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Mon, 15 Jan 2024 13:04:44 -0800 Subject: [PATCH] Fix some existing typos! --- book/src/filter_mutants.md | 2 +- book/src/limitations.md | 2 +- book/src/shards.md | 2 +- book/src/timeouts.md | 2 +- src/fnvalue.rs | 4 ++-- src/process.rs | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/book/src/filter_mutants.md b/book/src/filter_mutants.md index 93846013..dd61f4f8 100644 --- a/book/src/filter_mutants.md +++ b/book/src/filter_mutants.md @@ -20,7 +20,7 @@ Within this name, your regex can match any substring, including for example: - The trait, `impl Serialize` - The struct name, `ScenarioOutcome` - The function name, `serialize` -- The mutated return value, `with Ok(Defualt::default())`, or any part of it. +- The mutated return value, `with Ok(Default::default())`, or any part of it. The regex matches a substring, but can be anchored with `^` and `$` to require that it match the whole name. diff --git a/book/src/limitations.md b/book/src/limitations.md index f3a432f8..9499b3d7 100644 --- a/book/src/limitations.md +++ b/book/src/limitations.md @@ -51,7 +51,7 @@ cargo-mutants contains two main categories of code, which are mostly independent 2. Code for finding the modules to mutate and their source files, finding the tree to copy, adjusting paths after it is copied, and finally running builds and tests. This is very Cargo-specific, but should not be too hard to generalize. -The main precondition for supporting Bazel is a realistc test case: preferably an open source Rust tree built with Bazel, or at least a contributor with a Bazel-based Rust tree who is willing to help test and debug and to produce some test cases. +The main precondition for supporting Bazel is a realistic test case: preferably an open source Rust tree built with Bazel, or at least a contributor with a Bazel-based Rust tree who is willing to help test and debug and to produce some test cases. (See for more discussion.) diff --git a/book/src/shards.md b/book/src/shards.md index e93d2318..738560f1 100644 --- a/book/src/shards.md +++ b/book/src/shards.md @@ -60,7 +60,7 @@ Then, for each mutant in its shard, it does an incremental build and runs all th Each shard runs the same number of mutants, +/-1. Typically this will mean they each take roughly the same amount of time, although it's possible that some shards are unlucky in drawing mutants that happen to take longer to test. -A rough model for the overall execution time for all of the shards, allowing for this work occuring in parallel, is +A rough model for the overall execution time for all of the shards, allowing for this work occurring in parallel, is ```raw SHARD_STARTUP + (CLEAN_BUILD + TEST) + (N_MUTANTS/K) * (INCREMENTAL_BUILD + TEST) diff --git a/book/src/timeouts.md b/book/src/timeouts.md index 7811fcdb..cb20e635 100644 --- a/book/src/timeouts.md +++ b/book/src/timeouts.md @@ -24,7 +24,7 @@ run the test suite in the unmodified tree, and then sets a timeout for mutated tests at 5x the time to run tests with no mutations, and a minimum of 20 seconds. -The minimum of 20 seconds can be overriden by the +The minimum of 20 seconds can be overridden by the `CARGO_MUTANTS_MINIMUM_TEST_TIMEOUT` environment variable, measured in seconds. You can also set an explicit timeout with the `--timeout` option, also measured diff --git a/src/fnvalue.rs b/src/fnvalue.rs index 3ac2ebe0..7252c4cc 100644 --- a/src/fnvalue.rs +++ b/src/fnvalue.rs @@ -408,7 +408,7 @@ fn path_is_nonzero_unsigned(path: &Path) -> bool { /// If this is a path ending in `expected_ident`, return the first type argument, ignoring /// lifetimes. fn match_first_type_arg<'p>(path: &'p Path, expected_ident: &str) -> Option<&'p Type> { - // TODO: Maybe match only things witn one arg? + // TODO: Maybe match only things with one arg? let last = path.segments.last()?; if last.ident == expected_ident { if let PathArguments::AngleBracketed(AngleBracketedGenericArguments { args, .. }) = @@ -610,7 +610,7 @@ mod test { #[test] fn unknown_container_replacement() { // This looks like something that holds a &str, and maybe can be constructed - // from a &str, but we don't know anythig else about it, so we just guess. + // from a &str, but we don't know anything else about it, so we just guess. check_replacements( parse_quote! { -> UnknownContainer<'static, str> }, &[], diff --git a/src/process.rs b/src/process.rs index bea111e2..a4acdf27 100644 --- a/src/process.rs +++ b/src/process.rs @@ -6,7 +6,7 @@ //! knowledge of whether it's running Cargo or potentially something else. //! //! On Unix, the subprocess runs as its own process group, so that any -//! grandchild processses are also signalled if it's interrupted. +//! grandchild processes are also signalled if it's interrupted. use std::ffi::OsString; use std::io::Read; @@ -38,7 +38,7 @@ pub struct Process { } impl Process { - /// Run a subprocess to completion, watching for interupts, with a timeout, while + /// Run a subprocess to completion, watching for interrupts, with a timeout, while /// ticking the progress bar. pub fn run( argv: &[String],