diff --git a/README.md b/README.md index ee944cb96..64465d1e6 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Note that: tests/exercise-name.rs <- a test suite src/lib.rs <- an empty file or with exercise stubs example.rs <- example solution that satisfies tests - Cargo.toml <- with version equal to exercise defintion + Cargo.toml <- with version equal to exercise definition Cargo.lock <- Auto generated README.md <- Instructions for the exercise (see notes below) @@ -90,7 +90,7 @@ Note that: - If porting an existing exercise from problem-specifications that has a `canonical-data.json` file, use the version in `canonical-data.json` for that exercise as your `Cargo.toml` version. Otherwise, use "0.0.0". - An exercise may contain `.meta/hints.md`. This is optional and will appear after the normal exercise - instructions if present. Rust is different in many ways from other languages. This is a place where the differences required for Rust are explained. If it is a large change, you may want to call this out as a comment at the top of `src/lib.rs`, so the user recognises to read this section before starting. + instructions if present. Rust is different in many ways from other languages. This is a place where the differences required for Rust are explained. If it is a large change, you may want to call this out as a comment at the top of `src/lib.rs`, so the user recognizes to read this section before starting. - If the test suite is appreciably sped up by running in release mode, and there is reason to be confident that the example implementation does not contain any overflow errors, consider adding a file `.meta/test-in-release-mode`. This should contain brief comments explaining the situation. @@ -98,7 +98,7 @@ Note that: - `README.md` may be [regenerated](https://github.com/exercism/docs/blob/master/maintaining-a-track/regenerating-exercise-readmes.md) from Exercism data. The generator will use the `description.md` from the exercise directory in the [problem-specifications repository](https://github.com/exercism/problem-specifications/tree/master/exercises), then any hints in `.meta/hints.md`, then the [Rust-specific instructions](https://github.com/exercism/rust/blob/master/config/exercise-readme-insert.md). The `## Source` section comes from the `metadata.yml` in the same directory. Convention is that the description of the source remains text and the link is both name and hyperlink of the markdown link. -- Be sure to add the exercise to an appropriate place in the `config.json` file. The position in the file determines the order exercises are sent. Generate a unique UUID for the exercise. Current difficuly levels in use are 1, 4, 7 and 10. +- Be sure to add the exercise to an appropriate place in the `config.json` file. The position in the file determines the order exercises are sent. Generate a unique UUID for the exercise. Current difficulty levels in use are 1, 4, 7 and 10. ## Rust icon The Rust Logo is created by the Mozilla Corporation, and has been released under the [Creative Commons Attribution 4.0 International license](https://creativecommons.org/licenses/by/4.0/). diff --git a/exercises/crypto-square/README.md b/exercises/crypto-square/README.md index 6aed6032d..9491936f8 100644 --- a/exercises/crypto-square/README.md +++ b/exercises/crypto-square/README.md @@ -59,7 +59,7 @@ chunks with a single trailing space. ``` Notice that were we to stack these, we could visually decode the -cyphertext back in to the original message: +ciphertext back in to the original message: ```text "imtgdvs" diff --git a/exercises/diamond/example.rs b/exercises/diamond/example.rs index cd81527a8..8f73aff55 100644 --- a/exercises/diamond/example.rs +++ b/exercises/diamond/example.rs @@ -20,7 +20,7 @@ pub fn get_diamond(diamond_char: char) -> Vec { //build second half let mut rev = result.clone(); - rev.pop(); //remove middle pice to avoid duplicates + rev.pop(); //remove middle piece to avoid duplicates for line in rev.drain(..).rev() { result.push(line); } diff --git a/exercises/dominoes/README.md b/exercises/dominoes/README.md index 3c65e019d..a7110cf5a 100644 --- a/exercises/dominoes/README.md +++ b/exercises/dominoes/README.md @@ -4,8 +4,8 @@ Make a chain of dominoes. Compute a way to order a given set of dominoes in such a way that they form a correct domino chain (the dots on one half of a stone match the dots on the -neighbouring half of an adjacent stone) and that dots on the halfs of the stones -which don't have a neighbour (the first and last stone) match each other. +neighbouring half of an adjacent stone) and that dots on the halves of the +stones which don't have a neighbour (the first and last stone) match each other. For example given the stones `[2|1]`, `[2|3]` and `[1|3]` you should compute something like `[1|2] [2|3] [3|1]` or `[3|2] [2|1] [1|3]` or `[1|3] [3|2] [2|1]` etc, where the first and last numbers are the same. diff --git a/exercises/dot-dsl/.meta/ALLOWED_TO_NOT_COMPILE b/exercises/dot-dsl/.meta/ALLOWED_TO_NOT_COMPILE index aaa3bbde9..1c30a802c 100644 --- a/exercises/dot-dsl/.meta/ALLOWED_TO_NOT_COMPILE +++ b/exercises/dot-dsl/.meta/ALLOWED_TO_NOT_COMPILE @@ -1,3 +1,3 @@ Stub does not compile because not every module and struct method were implemented. -This exercise is an itroduction to modules system and builder pattern, therefore +This exercise is an introduction to modules system and builder pattern, therefore implementing very module in the stub reduces student learning. diff --git a/exercises/grep/.meta/hints.md b/exercises/grep/.meta/hints.md index 5fa85e188..1da25d695 100644 --- a/exercises/grep/.meta/hints.md +++ b/exercises/grep/.meta/hints.md @@ -6,9 +6,9 @@ To learn more about the crate refer to the [failure documentation](https://boats ### Additional reading While this exercise asks you to implement only the most basic functions of `grep`, -there is acually a project to fully re-implement `grep` in Rust - [ripgrep](https://github.com/BurntSushi/ripgrep). +there is actually a project to fully re-implement `grep` in Rust - [ripgrep](https://github.com/BurntSushi/ripgrep). -If you liked the concept of rewriting the basic util programms in Rust be sure to check the following projects: +If you liked the concept of rewriting the basic util programs in Rust be sure to check the following projects: - [fd](https://github.com/sharkdp/fd) - a clone of `find` - [exa](https://github.com/ogham/exa) - a clone of `ls` - [bat](https://github.com/sharkdp/bat) - a clone of `cat` diff --git a/exercises/grep/README.md b/exercises/grep/README.md index 2ca24ed00..205f19a6e 100644 --- a/exercises/grep/README.md +++ b/exercises/grep/README.md @@ -72,9 +72,9 @@ To learn more about the crate refer to the [failure documentation](https://boats ### Additional reading While this exercise asks you to implement only the most basic functions of `grep`, -there is acually a project to fully re-implement `grep` in Rust - [ripgrep](https://github.com/BurntSushi/ripgrep). +there is actually a project to fully re-implement `grep` in Rust - [ripgrep](https://github.com/BurntSushi/ripgrep). -If you liked the concept of rewriting the basic util programms in Rust be sure to check the following projects: +If you liked the concept of rewriting the basic util programs in Rust be sure to check the following projects: - [fd](https://github.com/sharkdp/fd) - a clone of `find` - [exa](https://github.com/ogham/exa) - a clone of `ls` - [bat](https://github.com/sharkdp/bat) - a clone of `cat` diff --git a/exercises/luhn-trait/.meta/metadata.yml b/exercises/luhn-trait/.meta/metadata.yml index dfa0c3b26..4575656fe 100644 --- a/exercises/luhn-trait/.meta/metadata.yml +++ b/exercises/luhn-trait/.meta/metadata.yml @@ -1,3 +1,3 @@ --- blurb: "Luhn: Using a Custom Trait" -source: "The Rust track maintainters, based on the original Luhn exercise" +source: "The Rust track maintainers, based on the original Luhn exercise" diff --git a/exercises/luhn-trait/README.md b/exercises/luhn-trait/README.md index d3ec3cf32..1d7e2a7cd 100644 --- a/exercises/luhn-trait/README.md +++ b/exercises/luhn-trait/README.md @@ -81,7 +81,7 @@ If you want to know more about Exercism, take a look at the [contribution guide] ## Source -The Rust track maintainters, based on the original Luhn exercise +The Rust track maintainers, based on the original Luhn exercise ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/nucleotide-codons/tests/codons.rs b/exercises/nucleotide-codons/tests/codons.rs index 3ffdf1e01..acd310f1c 100644 --- a/exercises/nucleotide-codons/tests/codons.rs +++ b/exercises/nucleotide-codons/tests/codons.rs @@ -46,7 +46,7 @@ fn test_isoleucine() { #[test] #[ignore] fn test_arginine_name() { - // In arginine CGA can be "compresed" both as CGN and as MGR + // In arginine CGA can be "compressed" both as CGN and as MGR let info = codons::parse(make_pairs()); assert_eq!(info.name_for("CGA"), Ok("arginine")); assert_eq!(info.name_for("CGN"), Ok("arginine")); diff --git a/exercises/ocr-numbers/tests/ocr-numbers.rs b/exercises/ocr-numbers/tests/ocr-numbers.rs index a98c8f082..5e148473f 100644 --- a/exercises/ocr-numbers/tests/ocr-numbers.rs +++ b/exercises/ocr-numbers/tests/ocr-numbers.rs @@ -25,7 +25,7 @@ fn input_with_columns_not_multiple_of_three_is_error() { #[test] #[ignore] #[cfg_attr(rustfmt, rustfmt_skip)] -fn unrecognized_chararcters_return_question_mark() { +fn unrecognized_characters_return_question_mark() { let input = " \n".to_string() + " _\n" + " |\n" + diff --git a/exercises/react/example.rs b/exercises/react/example.rs index d4d9ee53d..21c4043c0 100644 --- a/exercises/react/example.rs +++ b/exercises/react/example.rs @@ -191,7 +191,7 @@ impl<'a, T: Copy + PartialEq> Reactor<'a, T> { let (new_value, dependents) = { // This block limits the scope of the self.cells borrow. - // This is necessary becaue we borrow it mutably below. + // This is necessary because we borrow it mutably below. let (dependencies, f, dependents) = match self.computes.get(id) { Some(c) => (&c.dependencies, &c.f, c.cell.dependents.clone()), None => panic!("Cell to update disappeared while querying"), diff --git a/exercises/rectangles/tests/rectangles.rs b/exercises/rectangles/tests/rectangles.rs index 8162ef511..b61dc4a95 100644 --- a/exercises/rectangles/tests/rectangles.rs +++ b/exercises/rectangles/tests/rectangles.rs @@ -82,7 +82,7 @@ fn rectangle_of_width_1() { #[test] #[ignore] -fn unit_equare() { +fn unit_square() { let lines = &[ "++", "++" diff --git a/exercises/rna-transcription/example.rs b/exercises/rna-transcription/example.rs index 98801c580..680112981 100644 --- a/exercises/rna-transcription/example.rs +++ b/exercises/rna-transcription/example.rs @@ -9,7 +9,7 @@ pub enum Nucleotide { } impl Nucleotide { - /// Parses a nucleotode from its character value, if valid. + /// Parses a nucleotide from its character value, if valid. fn from_char(ch: char) -> Option { Some(match ch { 'A' => Nucleotide::Adenine, diff --git a/exercises/say/tests/say.rs b/exercises/say/tests/say.rs index 62af19e8b..f4b07baba 100644 --- a/exercises/say/tests/say.rs +++ b/exercises/say/tests/say.rs @@ -1,7 +1,7 @@ extern crate say; // Note: No tests created using 'and' with numbers. -// Aparently Most American English does not use the 'and' with numbers, +// Apparently Most American English does not use the 'and' with numbers, // where it is common in British English to use the 'and'. #[test] diff --git a/exercises/simple-cipher/README.md b/exercises/simple-cipher/README.md index 75c7fcb3c..7c4be8177 100644 --- a/exercises/simple-cipher/README.md +++ b/exercises/simple-cipher/README.md @@ -13,8 +13,8 @@ for A, and so with the others." Ciphers are very straight-forward algorithms that allow us to render text less readable while still allowing easy deciphering. They are -vulnerable to many forms of cryptoanalysis, but we are lucky that -generally our little sisters are not cryptoanalysts. +vulnerable to many forms of cryptanalysis, but we are lucky that +generally our little sisters are not cryptanalysts. The Caesar Cipher was used for some messages from Julius Caesar that were sent afield. Now Caesar knew that the cipher wasn't very good, but diff --git a/exercises/triangle/.meta/hints.md b/exercises/triangle/.meta/hints.md index a7a220467..deb679100 100644 --- a/exercises/triangle/.meta/hints.md +++ b/exercises/triangle/.meta/hints.md @@ -13,7 +13,7 @@ Or maybe you will come up with an approach that uses none of those! ## Non-integer lengths The base exercise tests identification of triangles whose sides are all -integers. However, some triangles cannot be represented by pure integers. A simple example is a right triangle (an isocoles triangle whose equal sides are separated by 90 degrees) whose equal sides both have length of 1. Its hypotenuse is the square root of 2, which is an irrational number: no simple multiplication can represent this number as an integer. +integers. However, some triangles cannot be represented by pure integers. A simple example is a right triangle (an isosceles triangle whose equal sides are separated by 90 degrees) whose equal sides both have length of 1. Its hypotenuse is the square root of 2, which is an irrational number: no simple multiplication can represent this number as an integer. It would be tedious to rewrite the analysis functions to handle both integer and floating-point cases, and particularly tedious to do so for all potential integer and floating point types: given signed and unsigned variants of bitwidths 8, 16, 32, 64, and 128, that would be 10 reimplementations of fundamentally the same code even before considering floats! diff --git a/exercises/triangle/README.md b/exercises/triangle/README.md index a50ed4b63..5bf492780 100644 --- a/exercises/triangle/README.md +++ b/exercises/triangle/README.md @@ -37,7 +37,7 @@ Or maybe you will come up with an approach that uses none of those! ## Non-integer lengths The base exercise tests identification of triangles whose sides are all -integers. However, some triangles cannot be represented by pure integers. A simple example is a right triangle (an isocoles triangle whose equal sides are separated by 90 degrees) whose equal sides both have length of 1. Its hypotenuse is the square root of 2, which is an irrational number: no simple multiplication can represent this number as an integer. +integers. However, some triangles cannot be represented by pure integers. A simple example is a right triangle (an isosceles triangle whose equal sides are separated by 90 degrees) whose equal sides both have length of 1. Its hypotenuse is the square root of 2, which is an irrational number: no simple multiplication can represent this number as an integer. It would be tedious to rewrite the analysis functions to handle both integer and floating-point cases, and particularly tedious to do so for all potential integer and floating point types: given signed and unsigned variants of bitwidths 8, 16, 32, 64, and 128, that would be 10 reimplementations of fundamentally the same code even before considering floats! diff --git a/exercises/variable-length-quantity/example.rs b/exercises/variable-length-quantity/example.rs index 7f2bdf969..dff1e4b32 100644 --- a/exercises/variable-length-quantity/example.rs +++ b/exercises/variable-length-quantity/example.rs @@ -18,7 +18,7 @@ fn to_bytes_single(mut value: u32) -> Vec { // over allocates, but avoids growth let mut res = Vec::with_capacity(4); - // 0 must be handeled specially, because we need to push one byte + // 0 must be handled specially, because we need to push one byte if value == 0 { return vec![0]; }