]> git.lizzy.rs Git - rust.git/commitdiff
Correct failing book test
authorPanashe M. Fundira <fundirap@gmail.com>
Mon, 22 Aug 2016 16:10:02 +0000 (12:10 -0400)
committerPanashe M. Fundira <fundirap@gmail.com>
Mon, 22 Aug 2016 16:10:02 +0000 (12:10 -0400)
src/doc/book/traits.md

index 164a851edeff4307f4e97b0dbc2d74a451bd6875..9cbb514e2806576e7c9d3f9cbddc5e66f2a307de 100644 (file)
@@ -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;