From 5a520921094ef2e9608567c1e42e7e77e4206060 Mon Sep 17 00:00:00 2001 From: jayber Date: Mon, 30 May 2022 15:13:55 +0100 Subject: [PATCH] docs: updated prefix comments as per requests at end of README.md in Section "Completion", i.e. I added some hopefully useful text to errors4.rs and 5 and option1.rs 2 and 3. Just attempt to do something useful for repository as first commit. --- exercises/error_handling/errors4.rs | 2 ++ exercises/error_handling/errors5.rs | 3 ++- exercises/option/option1.rs | 2 ++ exercises/option/option2.rs | 4 ++++ exercises/option/option3.rs | 1 + 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/exercises/error_handling/errors4.rs b/exercises/error_handling/errors4.rs index 0685c374..d1d1b4f9 100644 --- a/exercises/error_handling/errors4.rs +++ b/exercises/error_handling/errors4.rs @@ -1,4 +1,6 @@ // errors4.rs +// The code is excessively positive about the numbers given it. It should fail if +// they aren't, returning the appropriate Result. // Make this test pass! Execute `rustlings hint errors4` for hints :) // I AM NOT DONE diff --git a/exercises/error_handling/errors5.rs b/exercises/error_handling/errors5.rs index 365a8691..ddcee18d 100644 --- a/exercises/error_handling/errors5.rs +++ b/exercises/error_handling/errors5.rs @@ -1,7 +1,8 @@ // errors5.rs // This program uses a completed version of the code from errors4. -// It won't compile right now! Why? +// It won't compile right now! Why? What are all the possible return +// types from main? // Execute `rustlings hint errors5` for hints! // I AM NOT DONE diff --git a/exercises/option/option1.rs b/exercises/option/option1.rs index 17cf4f60..b49fbe19 100644 --- a/exercises/option/option1.rs +++ b/exercises/option/option1.rs @@ -1,4 +1,6 @@ // option1.rs +// How does the function signature of print_number differ from where +// it is called in main? // Make me compile! Execute `rustlings hint option1` for hints // I AM NOT DONE diff --git a/exercises/option/option2.rs b/exercises/option/option2.rs index c6b83ece..d954d2a8 100644 --- a/exercises/option/option2.rs +++ b/exercises/option/option2.rs @@ -1,4 +1,8 @@ // option2.rs +// You're gonna add if let and while let to the function below +// where the todo: are +// what's the difference between 'word' and 'optional_word' +// and how do you get one from the other? // Make me compile! Execute `rustlings hint option2` for hints // I AM NOT DONE diff --git a/exercises/option/option3.rs b/exercises/option/option3.rs index 045d2acb..43ba3e29 100644 --- a/exercises/option/option3.rs +++ b/exercises/option/option3.rs @@ -1,4 +1,5 @@ // option3.rs +// Let the compiler guide you. Also: https://doc.rust-lang.org/std/keyword.ref.html // Make me compile! Execute `rustlings hint option3` for hints // I AM NOT DONE