Skip to content

Commit

Permalink
Correct failing book test
Browse files Browse the repository at this point in the history
  • Loading branch information
munyari committed Aug 22, 2016
1 parent a5a5c10 commit 3da5f93
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/doc/book/traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ implementing this trait passed as a parameter. `Self`, `&Self` or `&mut Self`
may be used depending on the level of ownership required.

```rust
struct Circle {
x: f64,
y: f64,
radius: f64,
}

trait HasArea {
fn area(&self) -> f64;

Expand Down

0 comments on commit 3da5f93

Please sign in to comment.