From 8a8cccd4b60d85498c99c14141a1dab1c9e5cf5a Mon Sep 17 00:00:00 2001 From: Corey Richardson Date: Fri, 6 Dec 2013 01:26:49 -0500 Subject: Explain potentially confusing string example. Reported be @ElBaha --- doc/tutorial.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'doc/tutorial.md') diff --git a/doc/tutorial.md b/doc/tutorial.md index 58bfd047d95..dee1f1334ef 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -207,14 +207,15 @@ let hi = "hi"; let mut count = 0; while count < 10 { - println!("count: {}", count); + println!("count is {}", count); count += 1; } ~~~~ -Although Rust can almost always infer the types of local variables, you -can specify a variable's type by following it with a colon, then the type -name. Static items, on the other hand, always require a type annotation. +Although Rust can almost always infer the types of local variables, you can +specify a variable's type by following it in the `let` with a colon, then the +type name. Static items, on the other hand, always require a type annotation. + ~~~~ static MONSTER_FACTOR: f64 = 57.8; -- cgit 1.4.1-3-g733a5