From 2186da27a85c487ffd3fa6ef5250b8ac557ca570 Mon Sep 17 00:00:00 2001 From: Chris Krycho Date: Mon, 9 Dec 2024 15:16:52 -0700 Subject: [PATCH] Remove emphasis on four-space indents I suspect this one goes *allllll* the way back to Rust for Rubyists. Fixes #3759 --- src/ch01-02-hello-world.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ch01-02-hello-world.md b/src/ch01-02-hello-world.md index 600401d4d8..5779360b11 100644 --- a/src/ch01-02-hello-world.md +++ b/src/ch01-02-hello-world.md @@ -121,18 +121,16 @@ println!("Hello, world!"); This line does all the work in this little program: it prints text to the screen. There are four important details to notice here. -First, Rust style is to indent with four spaces, not a tab. - -Second, `println!` calls a Rust macro. If it had called a function instead, it +First, `println!` calls a Rust macro. If it had called a function instead, it would be entered as `println` (without the `!`). We’ll discuss Rust macros in more detail in Chapter 20. For now, you just need to know that using a `!` means that you’re calling a macro instead of a normal function and that macros don’t always follow the same rules as functions. -Third, you see the `"Hello, world!"` string. We pass this string as an argument +Second, you see the `"Hello, world!"` string. We pass this string as an argument to `println!`, and the string is printed to the screen. -Fourth, we end the line with a semicolon (`;`), which indicates that this +Third, we end the line with a semicolon (`;`), which indicates that this expression is over and the next one is ready to begin. Most lines of Rust code end with a semicolon.