Fix very small typo in guide (#575)

This commit is contained in:
Noumir Poutipou 2018-07-28 18:36:23 +02:00 committed by Alex Crichton
parent decdbd92b8
commit fa4b636c25
3 changed files with 5 additions and 5 deletions

View File

@ -135,7 +135,7 @@ same as [`RefCell`] and can be mostly glossed over.
The purpose for this type, if you're interested though, is to uphold Rust's
guarantees about aliasing in a world where aliasing is rampant (JS).
Specifically the `&Foo` type means that there can be as much alaising as you'd
Specifically the `&Foo` type means that there can be as much aliasing as you'd
like, but crucially `&mut Foo` means that it is the sole pointer to the data
(no other `&Foo` to the same instance exists). The [`RefCell`] type in libstd
is a way of dynamically enforcing this at runtime (as opposed to compile time

View File

@ -197,5 +197,5 @@ possibilities!
}
```
All of these functions will call `console.log` in Rust, but each identifier
All of these functions will call `console.log` in JS, but each identifier
will have only one signature in Rust.

View File

@ -5,7 +5,7 @@ values enter Rust. Here we'll go into some more depth about how this is
implemented. There are two categories of traits for converting values, traits
for converting values from Rust to JS and traits for the other way around.
### From Rust to JS
## From Rust to JS
First up let's take a look at going from Rust to JS:
@ -37,7 +37,7 @@ The `IntoWasmAbi` trait is used in two locations. First it's used to convert
return values of Rust exported functions to JS. Second it's used to convert the
Rust arguments of JS functions imported to Rust.
### From JS to Rust
## From JS to Rust
Unfortunately the opposite direction from above, going from JS to Rust, is a bit
more complicated. Here we've got three traits:
@ -81,7 +81,7 @@ The `From*` family of traits are used for converting the Rust arguments in Rust
exported functions to JS. They are also used for the return value in JS
functions imported into Rust.
### Global stack
## Global stack
Mentioned above not all Rust types will fit within 32 bits. While we can
communicate an `f64` we don't necessarily have the ability to use all the bits.