diff --git a/.all-contributorsrc b/.all-contributorsrc
index 1549aa45..46e68ae5 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -655,6 +655,24 @@
"contributions": [
"maintenance"
]
+ },
+ {
+ "login": "wsh",
+ "name": "Will Hayworth",
+ "avatar_url": "https://avatars3.githubusercontent.com/u/181174?v=4",
+ "profile": "http://willhayworth.com",
+ "contributions": [
+ "content"
+ ]
+ },
+ {
+ "login": "chrizel",
+ "name": "Christian Zeller",
+ "avatar_url": "https://avatars3.githubusercontent.com/u/20802?v=4",
+ "profile": "https://github.com/chrizel",
+ "contributions": [
+ "content"
+ ]
}
],
"contributorsPerLine": 8,
diff --git a/README.md b/README.md
index 16f8c3d8..987bb839 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,5 @@
-
-[](#contributors-)
+[](#contributors-)
# rustlings π¦β€οΈ
@@ -169,97 +168,100 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
-
+
+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
diff --git a/exercises/conversions/from_into.rs b/exercises/conversions/from_into.rs
index f24cf61b..9d84174d 100644
--- a/exercises/conversions/from_into.rs
+++ b/exercises/conversions/from_into.rs
@@ -115,4 +115,18 @@ mod tests {
assert_eq!(p.name, "John");
assert_eq!(p.age, 30);
}
+
+ #[test]
+ fn test_trailing_comma() {
+ let p: Person = Person::from("Mike,32,");
+ assert_eq!(p.name, "John");
+ assert_eq!(p.age, 30);
+ }
+
+ #[test]
+ fn test_trailing_comma_and_some_string() {
+ let p: Person = Person::from("Mike,32,man");
+ assert_eq!(p.name, "John");
+ assert_eq!(p.age, 30);
+ }
}
diff --git a/exercises/conversions/from_str.rs b/exercises/conversions/from_str.rs
index af9eee6d..70ed1796 100644
--- a/exercises/conversions/from_str.rs
+++ b/exercises/conversions/from_str.rs
@@ -82,4 +82,16 @@ mod tests {
fn missing_name_and_invalid_age() {
",one".parse::().unwrap();
}
+
+ #[test]
+ #[should_panic]
+ fn trailing_comma() {
+ "John,32,".parse::().unwrap();
+ }
+
+ #[test]
+ #[should_panic]
+ fn trailing_comma_and_some_string() {
+ "John,32,man".parse::().unwrap();
+ }
}
diff --git a/exercises/move_semantics/move_semantics4.rs b/exercises/move_semantics/move_semantics4.rs
index a1c4a413..6308c296 100644
--- a/exercises/move_semantics/move_semantics4.rs
+++ b/exercises/move_semantics/move_semantics4.rs
@@ -18,7 +18,7 @@ fn main() {
println!("{} has length {} content `{:?}`", "vec1", vec1.len(), vec1);
}
-// `fill_vec()` no longer take `vec: Vec` as argument
+// `fill_vec()` no longer takes `vec: Vec` as argument
fn fill_vec() -> Vec {
let mut vec = vec;
diff --git a/exercises/threads/threads1.rs b/exercises/threads/threads1.rs
index b475b4a1..f31b317e 100644
--- a/exercises/threads/threads1.rs
+++ b/exercises/threads/threads1.rs
@@ -1,6 +1,6 @@
// threads1.rs
// Make this compile! Execute `rustlings hint threads1` for hints :)
-// The idea is the thread spawned on line 21 is completing jobs while the main thread is
+// The idea is the thread spawned on line 22 is completing jobs while the main thread is
// monitoring progress until 10 jobs are completed. Because of the difference between the
// spawned threads' sleep time, and the waiting threads sleep time, when you see 6 lines
// of "waiting..." and the program ends without timing out when running,
diff --git a/info.toml b/info.toml
index f1fc3981..23c64917 100644
--- a/info.toml
+++ b/info.toml
@@ -575,8 +575,7 @@ https://doc.rust-lang.org/rust-by-example/flow_control/while_let.html
Remember that Options can be stacked in if let and while let.
For example: Some(Some(variable)) = variable2
-
-
+Also see Option::flatten
"""
[[exercises]]