summaryrefslogtreecommitdiff
path: root/exercises/traits
diff options
context:
space:
mode:
authorZerotask <Zerotask@users.noreply.github.com>2021-04-23 19:54:31 +0200
committerZerotask <Zerotask@users.noreply.github.com>2021-04-23 19:54:31 +0200
commit249ad44cc03974fd34708c23d9832b1729c6e844 (patch)
treedb25c5f51d76d10bc129dbcc8df2c56c75b13f2b /exercises/traits
parent54804e344d84bb620447b7975a5b8ec4f9de2671 (diff)
docs(exercises): updated all exercises readme files
all exercises readme files now have a unified structure and a description
Diffstat (limited to 'exercises/traits')
-rw-r--r--exercises/traits/README.md11
1 files changed, 5 insertions, 6 deletions
diff --git a/exercises/traits/README.md b/exercises/traits/README.md
index 8cd03ec..de67acd 100644
--- a/exercises/traits/README.md
+++ b/exercises/traits/README.md
@@ -1,4 +1,4 @@
-### Traits
+# Traits
A trait is a collection of methods.
@@ -7,14 +7,13 @@ Data types can implement traits. To do so, the methods making up the trait are d
In this way, traits are somewhat similar to Java interfaces and C++ abstract classes.
Some additional common Rust traits include:
-
-+ `Clone` (the `clone` method),
-+ `Display` (which allows formatted display via `{}`), and
-+ `Debug` (which allows formatted display via `{:?}`).
+- `Clone` (the `clone` method)
+- `Display` (which allows formatted display via `{}`)
+- `Debug` (which allows formatted display via `{:?}`)
Because traits indicate shared behavior between data types, they are useful when writing generics.
-#### Book Sections
+## Further information
- [Traits](https://doc.rust-lang.org/book/ch10-02-traits.html)