Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
Typo, filename is now file_path.
  • Loading branch information
abiphone authored and carols10cents committed Jan 12, 2023
1 parent 2bd5d42 commit 1c0fd73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ch13-03-improving-our-io-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ we would remove them in the future. Well, that time is now!
We needed `clone` here because we have a slice with `String` elements in the
parameter `args`, but the `build` function doesn’t own `args`. To return
ownership of a `Config` instance, we had to clone the values from the `query`
and `filename` fields of `Config` so the `Config` instance can own its values.
and `file_path` fields of `Config` so the `Config` instance can own its values.

With our new knowledge about iterators, we can change the `build` function to
take ownership of an iterator as its argument instead of borrowing a slice.
Expand Down Expand Up @@ -118,7 +118,7 @@ the program. We want to ignore that and get to the next value, so first we call
value we want to put in the `query` field of `Config`. If `next` returns a
`Some`, we use a `match` to extract the value. If it returns `None`, it means
not enough arguments were given and we return early with an `Err` value. We do
the same thing for the `filename` value.
the same thing for the `file_path` field.

### Making Code Clearer with Iterator Adaptors

Expand Down

0 comments on commit 1c0fd73

Please sign in to comment.