Remove unknown `Context` identifier (#366)

pull/369/head
Patrik Pyrzanowski 1 year ago committed by GitHub
parent bb8983f6fe
commit 3a9e5de41c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,8 +27,7 @@ format, or just modify one of the existing formats.
## Example ## Example
In this example our invariants (or abstractions) are `Context`, `Formatter`, In this example our invariants (or abstractions) are `Formatter` and `Report`, while `Text` and `Json` are our strategy structs. These strategies
and `Report`, while `Text` and `Json` are our strategy structs. These strategies
have to implement the `Formatter` trait. have to implement the `Formatter` trait.
```rust ```rust
@ -98,8 +97,9 @@ fn main() {
The main advantage is separation of concerns. For example, in this case `Report` The main advantage is separation of concerns. For example, in this case `Report`
does not know anything about specific implementations of `Json` and `Text`, does not know anything about specific implementations of `Json` and `Text`,
whereas the output implementations does not care about how data is preprocessed, whereas the output implementations does not care about how data is preprocessed,
stored, and fetched. The only thing they have to know is context and a specific stored, and fetched. The only thing they have to know is a specific
trait and method to implement, i.e,`Formatter` and `run`. trait to implement and its method defining the concrete algorithm implementation processing
the result, i.e., `Formatter` and `format(...)`.
## Disadvantages ## Disadvantages

Loading…
Cancel
Save