A number of spell-checking corrections.

This commit is contained in:
Przemysław Wesołek 2015-04-25 16:46:34 +02:00
parent e3d00a4980
commit 2c2abe9a75
7 changed files with 8 additions and 8 deletions

View file

@ -8,7 +8,7 @@ good at: embedding in other languages, programs with specific space and time
requirements, and writing low-level code, like device drivers and operating
systems. It improves on current languages targeting this space by having a
number of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve zero-cost abstrations
eliminating all data races. Rust also aims to achieve zero-cost abstractions
even though some of these abstractions feel like those of a high-level
language. Even then, Rust still allows precise control like a low-level
language would.

View file

@ -294,7 +294,7 @@ is `Fn(i32) -> i32`.
Theres one other key point here: because were bounding a generic with a
trait, this will get monomorphized, and therefore, well be doing static
dispatch into the closure. Thats pretty neat. In many langauges, closures are
dispatch into the closure. Thats pretty neat. In many languages, closures are
inherently heap allocated, and will always involve dynamic dispatch. In Rust,
we can stack allocate our closure environment, and statically dispatch the
call. This happens quite often with iterators and their adapters, which often

View file

@ -556,7 +556,7 @@ This sets a few different options, with a logo, favicon, and a root URL.
## Generation options
`rustdoc` also contains a few other options on the command line, for further customiziation:
`rustdoc` also contains a few other options on the command line, for further customization:
- `--html-in-header FILE`: includes the contents of FILE at the end of the
`<head>...</head>` section.

View file

@ -129,7 +129,7 @@ about it first.
## Field-level mutability
Mutabilty is a property of either a borrow (`&mut`) or a binding (`let mut`).
Mutability is a property of either a borrow (`&mut`) or a binding (`let mut`).
This means that, for example, you cannot have a [`struct`][struct] with
some fields mutable and some immutable:

View file

@ -155,7 +155,7 @@ A function that takes a trait object is not specialized to each of the types
that implements `Foo`: only one copy is generated, often (but not always)
resulting in less code bloat. However, this comes at the cost of requiring
slower virtual function calls, and effectively inhibiting any chance of
inlining and related optimisations from occurring.
inlining and related optimizations from occurring.
### Why pointers?

View file

@ -184,7 +184,7 @@ wont have its methods:
```rust,ignore
let mut f = std::fs::File::open("foo.txt").ok().expect("Couldnt open foo.txt");
let result = f.write("whatever".as_bytes());
# result.unwrap(); // ignore the erorr
# result.unwrap(); // ignore the error
```
Heres the error:
@ -203,7 +203,7 @@ use std::io::Write;
let mut f = std::fs::File::open("foo.txt").ok().expect("Couldnt open foo.txt");
let result = f.write("whatever".as_bytes());
# result.unwrap(); // ignore the erorr
# result.unwrap(); // ignore the error
```
This will compile without error.

View file

@ -1,6 +1,6 @@
% Variable Bindings
Vitually every non-Hello World Rust program uses *variable bindings*. They
Virtually every non-Hello World Rust program uses *variable bindings*. They
look like this:
```rust