diff options
| author | mokou <mokou@fastmail.com> | 2022-07-15 14:31:49 +0200 |
|---|---|---|
| committer | mokou <mokou@fastmail.com> | 2022-07-15 14:31:49 +0200 |
| commit | c791cf4232fbfc313279b19b483c1adbca1c6862 (patch) | |
| tree | 655ad6c9d33dab11dfd70f28d0ec29d03749a70b /exercises/functions | |
| parent | f1c4caa37fe5027d121aec6433dee85433d9329d (diff) | |
| parent | c265b681b188ea21b3f8585e65ea363fc02c4b50 (diff) | |
Merge branch '5.0-dev'
Diffstat (limited to 'exercises/functions')
| -rw-r--r-- | exercises/functions/README.md | 3 | ||||
| -rw-r--r-- | exercises/functions/functions1.rs | 2 | ||||
| -rw-r--r-- | exercises/functions/functions2.rs | 2 | ||||
| -rw-r--r-- | exercises/functions/functions3.rs | 2 | ||||
| -rw-r--r-- | exercises/functions/functions4.rs | 5 | ||||
| -rw-r--r-- | exercises/functions/functions5.rs | 4 | ||||
| -rw-r--r-- | exercises/functions/mod.rs | 5 |
7 files changed, 11 insertions, 12 deletions
diff --git a/exercises/functions/README.md b/exercises/functions/README.md index 66547bd..6662d0d 100644 --- a/exercises/functions/README.md +++ b/exercises/functions/README.md @@ -1,6 +1,7 @@ # Functions -Here, you'll learn how to write functions and how Rust's compiler can trace things way back. +Here, you'll learn how to write functions and how the Rust compiler can help you debug errors even +in more complex code. ## Further information diff --git a/exercises/functions/functions1.rs b/exercises/functions/functions1.rs index 3112527..03d8af7 100644 --- a/exercises/functions/functions1.rs +++ b/exercises/functions/functions1.rs @@ -1,5 +1,5 @@ // functions1.rs -// Make me compile! Execute `rustlings hint functions1` for hints :) +// Execute `rustlings hint functions1` or use the `hint` watch subcommand for a hint. // I AM NOT DONE diff --git a/exercises/functions/functions2.rs b/exercises/functions/functions2.rs index 5721a17..7d40a57 100644 --- a/exercises/functions/functions2.rs +++ b/exercises/functions/functions2.rs @@ -1,5 +1,5 @@ // functions2.rs -// Make me compile! Execute `rustlings hint functions2` for hints :) +// Execute `rustlings hint functions2` or use the `hint` watch subcommand for a hint. // I AM NOT DONE diff --git a/exercises/functions/functions3.rs b/exercises/functions/functions3.rs index ed5f839..3b9e585 100644 --- a/exercises/functions/functions3.rs +++ b/exercises/functions/functions3.rs @@ -1,5 +1,5 @@ // functions3.rs -// Make me compile! Execute `rustlings hint functions3` for hints :) +// Execute `rustlings hint functions3` or use the `hint` watch subcommand for a hint. // I AM NOT DONE diff --git a/exercises/functions/functions4.rs b/exercises/functions/functions4.rs index 58637e4..65d5be4 100644 --- a/exercises/functions/functions4.rs +++ b/exercises/functions/functions4.rs @@ -1,8 +1,11 @@ // functions4.rs -// Make me compile! Execute `rustlings hint functions4` for hints :) +// Execute `rustlings hint functions4` or use the `hint` watch subcommand for a hint. // This store is having a sale where if the price is an even number, you get // 10 Rustbucks off, but if it's an odd number, it's 3 Rustbucks off. +// (Don't worry about the function bodies themselves, we're only interested +// in the signatures for now. If anything, this is a good way to peek ahead +// to future exercises!) // I AM NOT DONE diff --git a/exercises/functions/functions5.rs b/exercises/functions/functions5.rs index d22aa6c..5d76296 100644 --- a/exercises/functions/functions5.rs +++ b/exercises/functions/functions5.rs @@ -1,11 +1,11 @@ // functions5.rs -// Make me compile! Execute `rustlings hint functions5` for hints :) +// Execute `rustlings hint functions5` or use the `hint` watch subcommand for a hint. // I AM NOT DONE fn main() { let answer = square(3); - println!("The answer is {}", answer); + println!("The square of 3 is {}", answer); } fn square(num: i32) -> i32 { diff --git a/exercises/functions/mod.rs b/exercises/functions/mod.rs deleted file mode 100644 index 445b6f5..0000000 --- a/exercises/functions/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -mod functions1; -mod functions2; -mod functions3; -mod functions4; -mod functions5; |
