Skip to content

Fix typos in Provider chapter #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions content/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The block `impl HasName for Person` is a _provider_ of the `HasName` trait
for the `Person` context.

Similar to the concept of a consumer, the use of provider is common in any
Rust code that implements a trait. However, compared to cosumers, there
Rust code that implements a trait. However, compared to consumers, there
are limitations on how providers can be defined in Rust.

For this example, the `impl` block is a _context-specific_ provider for the
Expand All @@ -32,9 +32,9 @@ there can be at most one provider of `HasName` for the `Person` context.
Another common restriction is that the provider has to be defined in the same
crate as either the trait or the context.

The asymetry between what can be done with a provider, as compared to a consumer,
The asymmetry between what can be done with a provider, as compared to a consumer,
is often a source of complexity in many Rust programs. As we will learn in later chapters,
one of the goals of CGP is to break this asymetry, and make it easy to implement
one of the goals of CGP is to break this asymmetry, and make it easy to implement
_context-generic providers_.

## Providers as Consumers
Expand Down Expand Up @@ -76,4 +76,4 @@ In terms of genericity, the example code is _context-specific_ to the `Person` c
the consumer and provider side.

As we will see in later chapters, a powerful idea introduced by CGP is that a piece of code
can have _multiple spectrums_ of genericity on the consumer and provider sides.
can have _multiple spectrums_ of genericity on the consumer and provider sides.