From fce064db6b40de3c75714e6a1323eee0726675d6 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 6 Jul 2012 15:10:12 -0700 Subject: [PATCH] tutorial: Reduce header level for do/for loop sections --- doc/tutorial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/tutorial.md b/doc/tutorial.md index b662a218eb4..0e54485bf17 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -1112,7 +1112,7 @@ fn bare_function() { "I am a plain function"; } call_twice(bare_function); ~~~~ -### Do syntax +## Do syntax Closures in Rust are frequently used in combination with higher-order functions to simulate control structures like `if` and @@ -1183,7 +1183,7 @@ do spawn { Empty argument lists can be omitted from `do` expressions. -### For loops +## For loops Most iteration in Rust is done with `for` loops. Like `do`, `for` is a nice syntax for doing control flow with closures.