From 1c0fd73e4dd775607fd3bb93c0cf28bfda42b63e Mon Sep 17 00:00:00 2001 From: abiphone <50788307+abiphone@users.noreply.github.com> Date: Thu, 8 Dec 2022 23:26:59 +0800 Subject: [PATCH] Typo Typo, filename is now file_path. --- src/ch13-03-improving-our-io-project.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ch13-03-improving-our-io-project.md b/src/ch13-03-improving-our-io-project.md index b9ef0b430c..6831e540d0 100644 --- a/src/ch13-03-improving-our-io-project.md +++ b/src/ch13-03-improving-our-io-project.md @@ -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. @@ -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