Skip to content

Commit

Permalink
Merge pull request rust-lang#377 from danwilhelm/dw-typos
Browse files Browse the repository at this point in the history
  • Loading branch information
fmoko authored Apr 30, 2020
2 parents 071b51d + 9590082 commit de65026
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion exercises/macros/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Rust's macro system is very powerful, but also kind of difficult to wrap your
head around. We're not going to teach you how to write your own fully-featured
modules, instead we'll show you how to use and create them.
macros. Instead, we'll show you how to use and create them.

#### Book Sections

Expand Down
10 changes: 6 additions & 4 deletions exercises/standard_library_types/iterators2.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// iterators2.rs
// In this module, you'll learn some of unique advantages that iterators can offer
// Step 1. Complete the `capitalize_first` function to pass the first two cases
// Step 2. Apply the `capitalize_first` function to a vector of strings, ensuring that it returns a vector of strings as well
// Step 3. Apply the `capitalize_first` function again to a list, but try and ensure it returns a single string
// In this module, you'll learn some of unique advantages that iterators can offer.
// Step 1. Complete the `capitalize_first` function to pass the first two cases.
// Step 2. Apply the `capitalize_first` function to a vector of strings.
// Ensure that it returns a vector of strings as well.
// Step 3. Apply the `capitalize_first` function again to a list.
// Try to ensure it returns a single string.
// As always, there are hints if you execute `rustlings hint iterators2`!

// I AM NOT DONE
Expand Down
6 changes: 3 additions & 3 deletions exercises/standard_library_types/iterators4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
// I AM NOT DONE

pub fn factorial(num: u64) -> u64 {
// Complete this function to return factorial of num
// Complete this function to return the factorial of num
// Do not use:
// - return
// For extra fun don't use:
// Try not to use:
// - imperative style loops (for, while)
// - additional variables
// For the most fun don't use:
// For an extra challenge, don't use:
// - recursion
// Execute `rustlings hint iterators4` for hints.
}
Expand Down
8 changes: 4 additions & 4 deletions info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -640,10 +640,10 @@ name = "iterators4"
path = "exercises/standard_library_types/iterators4.rs"
mode = "test"
hint = """
In an imperative language you might write a for loop to iterate through
multiply the values into a mutable variable. Or you might write code more
functionally with recursion and a match clause. But you can also use ranges
and iterators to solve this in rust."""
In an imperative language, you might write a for loop that updates
a mutable variable. Or, you might write code utilizing recursion
and a match clause. In Rust you can take another functional
approach, computing the factorial elegantly with ranges and iterators."""

# TRAITS

Expand Down

0 comments on commit de65026

Please sign in to comment.