Skip to content

Commit e0e63a5

Browse files
committed
Merge pull request #3665 from apasel422/tutorial-fix
docs: minor tutorial fixes
2 parents 8cb3da5 + 1ee0566 commit e0e63a5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

doc/tutorial.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ This may sound intricate, but it is super-useful and will grow on you.
358358

359359
## Types
360360

361-
The basic types include the usual boolean, integral, and floating point types.
361+
The basic types include the usual boolean, integral, and floating-point types.
362362

363363
------------------------- -----------------------------------------------
364364
`()` Nil, the type that has only a single value
@@ -367,8 +367,8 @@ The basic types include the usual boolean, integral, and floating point types.
367367
`i8`, `i16`, `i32`, `i64` Signed integers with a specific size (in bits)
368368
`u8`, `u16`, `u32`, `u64` Unsigned integers with a specific size
369369
`float` The largest floating-point type efficiently supported on the target machine
370-
`f32`, `f64` Floating-point types with a specific size.
371-
`char` A Unicode character (32 bits).
370+
`f32`, `f64` Floating-point types with a specific size
371+
`char` A Unicode character (32 bits)
372372
------------------------- -----------------------------------------------
373373

374374
These can be combined in composite types, which will be described in
@@ -378,7 +378,7 @@ while N should be a literal number):
378378
------------------------- -----------------------------------------------
379379
`[T * N]` Vector (like an array in other languages) with N elements
380380
`[mut T * N]` Mutable vector with N elements
381-
`(T1, T2)` Tuple type. Any arity above 1 is supported
381+
`(T1, T2)` Tuple type; any arity above 1 is supported
382382
`&T`, `~T`, `@T` [Pointer types](#boxes-and-pointers)
383383
------------------------- -----------------------------------------------
384384

@@ -863,7 +863,7 @@ the return type follows the arrow.
863863

864864
~~~~
865865
fn line(a: int, b: int, x: int) -> int {
866-
return a*x + b;
866+
return a * x + b;
867867
}
868868
~~~~
869869

@@ -874,7 +874,7 @@ expression.
874874

875875
~~~~
876876
fn line(a: int, b: int, x: int) -> int {
877-
a*x + b
877+
a * x + b
878878
}
879879
~~~~
880880

@@ -891,11 +891,11 @@ fn do_nothing_the_easy_way() { }
891891
Ending the function with a semicolon like so is equivalent to returning `()`.
892892

893893
~~~~
894-
fn line(a: int, b: int, x: int) -> int { a*x + b }
895-
fn oops(a: int, b: int, x: int) -> () { a*x + b; }
894+
fn line(a: int, b: int, x: int) -> int { a * x + b }
895+
fn oops(a: int, b: int, x: int) -> () { a * x + b; }
896896
897-
assert 8 == line(5,3,1);
898-
assert () == oops(5,3,1);
897+
assert 8 == line(5, 3, 1);
898+
assert () == oops(5, 3, 1);
899899
~~~~
900900

901901
Methods are like functions, except that they are defined for a specific
@@ -1319,7 +1319,7 @@ Strings are implemented with vectors of `[u8]`, though they have a distinct
13191319
type. They support most of the same allocation options as
13201320
vectors, though the string literal without a storage sigil, e.g.
13211321
`"foo"` is treated differently than a comparable vector (`[foo]`).
1322-
Wheras plain vectors are stack-allocated fixed length vectors,
1322+
Whereas plain vectors are stack-allocated fixed-length vectors,
13231323
plain strings are region pointers to read-only memory.
13241324
13251325
~~~

0 commit comments

Comments
 (0)