From 22bb662d3eb9efd081a5603640628bdeebab97b9 Mon Sep 17 00:00:00 2001 From: Alexandre ESSE Date: Fri, 31 Mar 2023 11:20:11 +0200 Subject: [PATCH] fix(exercises): remove trailing spaces --- exercises/hashmaps/README.md | 2 +- exercises/lifetimes/README.md | 12 ++++++------ exercises/macros/README.md | 2 +- exercises/options/README.md | 2 +- exercises/threads/threads1.rs | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/exercises/hashmaps/README.md b/exercises/hashmaps/README.md index 30471cf..6afa04b 100644 --- a/exercises/hashmaps/README.md +++ b/exercises/hashmaps/README.md @@ -1,6 +1,6 @@ # Hashmaps A *hash map* allows you to associate a value with a particular key. -You may also know this by the names [*unordered map* in C++](https://en.cppreference.com/w/cpp/container/unordered_map), +You may also know this by the names [*unordered map* in C++](https://en.cppreference.com/w/cpp/container/unordered_map), [*dictionary* in Python](https://docs.python.org/3/tutorial/datastructures.html#dictionaries) or an *associative array* in other languages. This is the other data structure that we've been talking about before, when diff --git a/exercises/lifetimes/README.md b/exercises/lifetimes/README.md index 74a4a78..91373f7 100644 --- a/exercises/lifetimes/README.md +++ b/exercises/lifetimes/README.md @@ -3,17 +3,17 @@ Lifetimes tell the compiler how to check whether references live long enough to be valid in any given situation. For example lifetimes say "make sure parameter 'a' lives as long as parameter 'b' so that the return -value is valid". +value is valid". -They are only necessary on borrows, i.e. references, +They are only necessary on borrows, i.e. references, since copied parameters or moves are owned in their scope and cannot be referenced outside. Lifetimes mean that calling code of e.g. functions -can be checked to make sure their arguments are valid. Lifetimes are +can be checked to make sure their arguments are valid. Lifetimes are restrictive of their callers. -If you'd like to learn more about lifetime annotations, the -[lifetimekata](https://tfpk.github.io/lifetimekata/) project -has a similar style of exercises to Rustlings, but is all about +If you'd like to learn more about lifetime annotations, the +[lifetimekata](https://tfpk.github.io/lifetimekata/) project +has a similar style of exercises to Rustlings, but is all about learning to write lifetime annotations. ## Further information diff --git a/exercises/macros/README.md b/exercises/macros/README.md index e34bc3a..337816d 100644 --- a/exercises/macros/README.md +++ b/exercises/macros/README.md @@ -4,7 +4,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 macros. Instead, we'll show you how to use and create them. -If you'd like to learn more about writing your own macros, the +If you'd like to learn more about writing your own macros, the [macrokata](https://github.com/tfpk/macrokata) project has a similar style of exercises to Rustlings, but is all about learning to write Macros. diff --git a/exercises/options/README.md b/exercises/options/README.md index 6140a16..5433fed 100644 --- a/exercises/options/README.md +++ b/exercises/options/README.md @@ -1,6 +1,6 @@ # Options -Type Option represents an optional value: every Option is either Some and contains a value, or None, and does not. +Type Option represents an optional value: every Option is either Some and contains a value, or None, and does not. Option types are very common in Rust code, as they have a number of uses: - Initial values - Return values for functions that are not defined over their entire input range (partial functions) diff --git a/exercises/threads/threads1.rs b/exercises/threads/threads1.rs index d6376db..ae124ee 100644 --- a/exercises/threads/threads1.rs +++ b/exercises/threads/threads1.rs @@ -30,7 +30,7 @@ fn main() { if results.len() != 10 { panic!("Oh no! All the spawned threads did not finish!"); } - + println!(); for (i, result) in results.into_iter().enumerate() { println!("thread {} took {}ms", i, result);