summaryrefslogtreecommitdiff
path: root/info.toml
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-02-25 21:27:39 +0000
committerbors <bors@rust-lang.org>2020-02-25 21:27:39 +0000
commit78295ce92fa5842e3eb1a05979fd22c4cb8191e8 (patch)
tree1e0c866e0641d7c4e50837b5418360cd9f9daf13 /info.toml
parent358fb473cd3ebf06085b58f8c7ff1f649ec6ec7a (diff)
parentdc84aacc65392172164b728813449ecda8c3b6e6 (diff)
Auto merge of #274 - sjmann:master, r=fmoko
chore: fixed merge conflicts from traits exercises added by s-marios I hope this doesn't step on any toes but I wanted to try the traits exercises from #216 so I updated them to match the new structure with hints included in info.toml
Diffstat (limited to 'info.toml')
-rw-r--r--info.toml22
1 files changed, 22 insertions, 0 deletions
diff --git a/info.toml b/info.toml
index 4b89029..b1c6db5 100644
--- a/info.toml
+++ b/info.toml
@@ -586,6 +586,28 @@ multiply the values into a mutable variable. Or you might write code more
functionally with recursion and a match clause. But you can also use ranges
and iterators to solve this in rust."""
+# TRAITS
+
+[[exercises]]
+name = "traits1"
+path = "exercises/traits/traits1.rs"
+mode = "test"
+hint = """
+A discussion about Traits in Rust can be found at:
+https://doc.rust-lang.org/1.30.0/book/second-edition/ch10-02-traits.html
+"""
+
+[[exercises]]
+name = "traits2"
+path = "exercises/traits/traits2.rs"
+mode = "test"
+hint = """
+Notice how the trait takes ownership of 'self',and returns `Self'.
+Try mutating the incoming string vector.
+
+Vectors provide suitable methods for adding an element at the end. See
+the documentation at: https://doc.rust-lang.org/std/vec/struct.Vec.html"""
+
# THREADS
[[exercises]]