Update traits.md
This commit is contained in:
parent
f5a4383b21
commit
88c407c74f
1 changed files with 1 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ impl Circle {
|
|||
[methodsyntax]: method-syntax.html
|
||||
|
||||
Traits are similar, except that we first define a trait with a method
|
||||
signature, then implement the trait for a struct. Like this:
|
||||
signature, then implement the trait for a type. In this example, we implement the trait `HasArea` for `Circle`:
|
||||
|
||||
```rust
|
||||
struct Circle {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue