feat: Add traits3.rs exercise

This commit is contained in:
Sam White
2022-02-25 16:40:38 +00:00
committed by mokou
parent 9b66b2a0e9
commit f43c6d7877
2 changed files with 52 additions and 0 deletions

View File

@@ -704,6 +704,18 @@ what the result should look like!
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"""
[[exercises]]
name = "traits3"
path = "exercises/traits/traits3.rs"
mode = "test"
hint = """
Traits can have a default implementation for functions. Structs that implement
the trait can then use the default version of these functions if they choose not
implement the function themselves.
See the documentation at: https://doc.rust-lang.org/book/ch10-02-traits.html#default-implementations
"""
# QUIZ 3
[[exercises]]