summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-11-10 11:56:59 +0100
committerMatthias Beyer <mail@beyermatthias.de>2019-12-22 02:03:35 +0100
commit3059f0fb9de66f9b37eebade2d6bd2d173d535bb (patch)
treebe5fd10b36b47c06adce53d8187bb58f38fc40b1
parent74f1d0a31eb7e45a673a2d4bfb5565aeaa793133 (diff)
Use Iterator::flatten() instead of ::flat_map()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--bin/domain/imag-calendar/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/domain/imag-calendar/src/lib.rs b/bin/domain/imag-calendar/src/lib.rs
index e330699a..ff479757 100644
--- a/bin/domain/imag-calendar/src/lib.rs
+++ b/bin/domain/imag-calendar/src/lib.rs
@@ -156,7 +156,7 @@ fn import(rt: &Runtime) -> Result<()> {
} else { // is file, ensured by clap validator
Box::new(std::iter::once(Ok(path)))
})
- .flat_map(|it| it) // From Iter<Iter<Result<PathBuf>>> to Iter<Result<PathBuf>>
+ .flatten() // From Iter<Iter<Result<PathBuf>>> to Iter<Result<PathBuf>>
.and_then_ok(|path| {
trace!("Importing {}", path.display());
Ok({
@@ -167,7 +167,7 @@ fn import(rt: &Runtime) -> Result<()> {
}) // Iter<Result<Iter<_>>
.collect::<Result<Vec<_>>>()?
.into_iter()
- .flat_map(|it| it)
+ .flatten()
.and_then_ok(|fle| rt.report_touched(fle.get_location()).map_err(Error::from));
if do_fail {