From 9b9cbd08711ab33125ea74221b000ed1ac387f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Wed, 18 May 2022 15:47:08 +0800 Subject: [PATCH] chore: formatting code --- src/basic/method.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/basic/method.md b/src/basic/method.md index d890a0e3..f37cdad9 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(); } ```