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:
parent
d004c667fd
commit
1321f49428
1 changed files with 4 additions and 5 deletions
|
@ -51,10 +51,9 @@ pub fn list(rt: &Runtime) {
|
|||
[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)) {
|
||||
writeln!(rt.stdout(), "{}", id)
|
||||
.to_exit_code()
|
||||
.unwrap_or_exit();
|
||||
}
|
||||
ids.into_iter()
|
||||
.map(IntoStoreId::into_storeid)
|
||||
.trace_unwrap_exit(1)
|
||||
.for_each(|id| writeln!(rt.stdout(), "{}", id).to_exit_code().unwrap_or_exit());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue