diff --git a/.all-contributorsrc b/.all-contributorsrc index 4627e294..867f1d51 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -856,6 +856,16 @@ "contributions": [ "content" ] + }, + { + "login": "sateeshkumarb", + "name": "Sateesh ", + "avatar_url": "https://avatars.githubusercontent.com/u/429263?v=4", + "profile": "https://github.com/sateeshkumarb", + "contributions": [ + "code", + "content" + ] } ], "contributorsPerLine": 8, diff --git a/README.md b/README.md index fede6723..503cf2cf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![All Contributors](https://img.shields.io/badge/all_contributors-92-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-93-orange.svg?style=flat-square)](#contributors-) # rustlings 🦀❤️ @@ -280,6 +280,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
Brandon Macer

🖋
Stoian Dan

🖋
Pi Delport

🖋 +
Sateesh

💻 🖋 diff --git a/exercises/generics/generics1.rs b/exercises/generics/generics1.rs index 967287ef..f93e64a0 100644 --- a/exercises/generics/generics1.rs +++ b/exercises/generics/generics1.rs @@ -1,6 +1,8 @@ // This shopping list program isn't compiling! // Use your knowledge of generics to fix it. +// Execute `rustlings hint generics1` for hints! + // I AM NOT DONE fn main() { diff --git a/exercises/generics/generics2.rs b/exercises/generics/generics2.rs index 0cb59adc..1501529c 100644 --- a/exercises/generics/generics2.rs +++ b/exercises/generics/generics2.rs @@ -1,6 +1,8 @@ // This powerful wrapper provides the ability to store a positive integer value. // Rewrite it using generics so that it supports wrapping ANY type. +// Execute `rustlings hint generics2` for hints! + // I AM NOT DONE struct Wrapper { diff --git a/exercises/standard_library_types/iterators1.rs b/exercises/standard_library_types/iterators1.rs index 3fd519d6..4606ad35 100644 --- a/exercises/standard_library_types/iterators1.rs +++ b/exercises/standard_library_types/iterators1.rs @@ -1,11 +1,11 @@ // iterators1.rs -// +// // Make me compile by filling in the `???`s // // When performing operations on elements within a collection, iterators are essential. -// This module helps you get familiar with the structure of using an iterator and +// This module helps you get familiar with the structure of using an iterator and // how to go through elements within an iterable collection. -// +// // Execute `rustlings hint iterators1` for hints :D // I AM NOT DONE diff --git a/exercises/structs/structs3.rs b/exercises/structs/structs3.rs index 8d8b4710..a80d0625 100644 --- a/exercises/structs/structs3.rs +++ b/exercises/structs/structs3.rs @@ -31,7 +31,7 @@ impl Package { } fn get_fees(&self, cents_per_gram: i32) -> ??? { - // Something goes here... + // Something goes here... } } diff --git a/info.toml b/info.toml index 4fe1279c..0e9f4282 100644 --- a/info.toml +++ b/info.toml @@ -914,7 +914,19 @@ path = "exercises/conversions/try_from_into.rs" mode = "test" hint = """ Follow the steps provided right before the `TryFrom` implementation. -You can also use the example at https://doc.rust-lang.org/std/convert/trait.TryFrom.html""" +You can also use the example at https://doc.rust-lang.org/std/convert/trait.TryFrom.html + +You might want to look back at the exercise errorsn (or its hints) to remind +yourself about how `Box` works. + +If you're trying to return a string as an error, note that neither `str` +nor `String` implements `error::Error`. However, there is an implementation +of `From<&str>` for `Box`. This means you can use `.into()` or +the `?` operator to convert your string into the correct error type. + +If you're having trouble with using the `?` operator to convert an error string, +recall that `?` works to convert `Err(something)` into the appropriate error +type for returning from the function.""" [[exercises]] name = "as_ref_mut" @@ -930,4 +942,7 @@ mode = "test" hint = """ The implementation of FromStr should return an Ok with a Person object, or an Err with an error if the string is not valid. -This is almost like the `try_from_into` exercise.""" +This is almost like the `try_from_into` exercise. + +If you're having trouble with returning the correct error type, see the +hints for try_from_into."""