mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
typo in tutorial
This commit is contained in:
parent
a0080f4e07
commit
b4fe856645
@ -2195,7 +2195,7 @@ use std::float::consts::pi;
|
|||||||
# impl Shape for CircleStruct { fn area(&self) -> float { pi * square(self.radius) } }
|
# impl Shape for CircleStruct { fn area(&self) -> float { pi * square(self.radius) } }
|
||||||
|
|
||||||
let concrete = @CircleStruct{center:Point{x:3f,y:4f},radius:5f};
|
let concrete = @CircleStruct{center:Point{x:3f,y:4f},radius:5f};
|
||||||
let mycircle: Circle = concrete as @Circle;
|
let mycircle: @Circle = concrete as @Circle;
|
||||||
let nonsense = mycircle.radius() * mycircle.area();
|
let nonsense = mycircle.radius() * mycircle.area();
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user