]> git.lizzy.rs Git - rust.git/commitdiff
Fix documentation example in the book
authorOliver Middleton <olliemail27@gmail.com>
Wed, 10 Feb 2016 14:53:42 +0000 (14:53 +0000)
committerOliver Middleton <olliemail27@gmail.com>
Wed, 10 Feb 2016 17:19:27 +0000 (17:19 +0000)
The code sections shouldn't be inside a ```text block.

src/doc/book/documentation.md

index ede3100194e5bd308e9f2a47c2373bd3519ced57..8d1e58ac17397559b8a534c25c164b31dbf8f34f 100644 (file)
@@ -319,7 +319,7 @@ our source code:
 ```text
     First, we set `x` to five:
 
-    ```text
+    ```rust
     let x = 5;
     # let y = 6;
     # println!("{}", x + y);
@@ -327,7 +327,7 @@ our source code:
 
     Next, we set `y` to six:
 
-    ```text
+    ```rust
     # let x = 5;
     let y = 6;
     # println!("{}", x + y);
@@ -335,7 +335,7 @@ our source code:
 
     Finally, we print the sum of `x` and `y`:
 
-    ```text
+    ```rust
     # let x = 5;
     # let y = 6;
     println!("{}", x + y);