diff --git a/src/basic/method.md b/src/basic/method.md index d35d24b4..0e9b456c 100644 --- a/src/basic/method.md +++ b/src/basic/method.md @@ -256,7 +256,6 @@ impl Rectangle { ```rust #![allow(unused)] -fn main() { enum Message { Quit, Move { x: i32, y: i32 }, @@ -270,8 +269,9 @@ impl Message { } } -let m = Message::Write(String::from("hello")); -m.call(); +fn main() { + let m = Message::Write(String::from("hello")); + m.call(); } ```