Optimize implementation

Code-wise, the functionality was not changed. The changes only make the
code much more pretty.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2018-11-04 22:28:47 +01:00
parent d004c667fd
commit 1321f49428

View file

@ -51,10 +51,9 @@ pub fn list(rt: &Runtime) {
[id.year() as u32, id.month(), id.day(), id.hour(), id.minute(), id.second()] [id.year() as u32, id.month(), id.day(), id.hour(), id.minute(), id.second()]
}); });
for id in ids.into_iter().map(|id| id.into_storeid().map_err_trace_exit_unwrap(1)) { ids.into_iter()
writeln!(rt.stdout(), "{}", id) .map(IntoStoreId::into_storeid)
.to_exit_code() .trace_unwrap_exit(1)
.unwrap_or_exit(); .for_each(|id| writeln!(rt.stdout(), "{}", id).to_exit_code().unwrap_or_exit());
}
} }