Skip to content

Commit

Permalink
fix typos (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvdb authored Feb 16, 2024
1 parent 345910d commit b77653e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/idioms/deref.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl<T> Deref for Vec<T> {

A `Vec<T>` is an owning collection of `T`s, while a slice (`&[T]`) is a borrowed
collection of `T`s. Implementing `Deref` for `Vec` allows implicit dereferencing
from `&Vec<T>` to `&[T]` and includes the relationship in auto-derefencing
from `&Vec<T>` to `&[T]` and includes the relationship in auto-dereferencing
searches. Most methods you might expect to be implemented for `Vec`s are instead
implemented for slices.

Expand Down
2 changes: 1 addition & 1 deletion src/idioms/ffi/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

In foreign languages like C, errors are represented by return codes. However,
Rust's type system allows much more rich error information to be captured and
propogated through a full type.
propagated through a full type.

This best practice shows different kinds of error codes, and how to expose them
in a usable way:
Expand Down
2 changes: 1 addition & 1 deletion src/patterns/behavioural/command.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ fn main() {
If our commands are small and may be defined as functions or passed as a closure
then using function pointers might be preferable since it does not exploit
dynamic dispatch. But if our command is a whole struct with a bunch of functions
and variables defined as seperated module then using trait objects would be more
and variables defined as separated module then using trait objects would be more
suitable. A case of application can be found in [`actix`](https://actix.rs/),
which uses trait objects when it registers a handler function for routes. In
case of using `Fn` trait objects we can create and use commands in the same way
Expand Down

0 comments on commit b77653e

Please sign in to comment.