diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2021-06-20 18:52:46 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-08-18 10:07:17 +0200 |
commit | 4b1f0d251a542ad1f02c7b17005ff18ea893d78f (patch) | |
tree | 61665a3944158b9f45826ba345048d13843f5c51 /src/repository/repository.rs | |
parent | a4c2d39a3bd552278a6d348312f919430e2c3323 (diff) |
Refactor iteration to be less nested
Split closure into two distinct map calls, to reduce nesting here and
improve readability.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/repository/repository.rs')
-rw-r--r-- | src/repository/repository.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/repository/repository.rs b/src/repository/repository.rs index 8dee4cb..45c4604 100644 --- a/src/repository/repository.rs +++ b/src/repository/repository.rs @@ -144,7 +144,8 @@ impl Repository { // Map all `Value`s to String and then join them on the path that is relative to // the root directory of the repository. - .map(|patch| patch.into_str().map_err(Error::from)) + .map(config::Value::into_str) + .map_err(Error::from) .map_ok(|patch| path_relative_to_root.join(patch)) .inspect(|patch| trace!("Patch relative to root: {:?}", patch.as_ref().map(|p| p.display()))) |