Commit graph

15 commits

Author SHA1 Message Date
90eaeb642a Remove magic constants in trace_unwrap_exit/map_err_trace_exit_unwrap calls
This patch removes the magic constant we used when calling
`trace_unwrap_exit()` or `map_err_trace_exit_unwrap()`.
We used to call it with `1` as parameter, where the number was the exit
code to use. Now the implementation of the function does it
automatically (using 1 (one) as exit code).

All calls of these functions were fixed. Thanks to vim this was easy.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-11 03:52:04 +01:00
f1a639ea8c Change id reporting API to return ExitCode
Because this API only errors when write!() errors occur, we can return
the exit code as an error here.

This way the user of the API can immediately exit if there was an IO
error, but the API automatically takes care of the right return value,
returning (exiting) with zero (0) if there was an "Broken pipe" error
and with one (1) otherwise, which is the expected behaviour here.

All calls to that API were changed accordingly.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-11 03:22:56 +01:00
9185abcfa5 Update copyright years
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-01-03 18:41:36 +01:00
f6483f54db Add ID reporting in imag-timetrack 2018-11-06 20:35:18 +01:00
fd2367b849 imag-timetrack: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:29 +01:00
22fb26dc12 Replace Store::retrieve_for_module() with own iterator type 2018-04-24 13:40:42 +02:00
50461b839a Use output stream from Runtime::stdout() 2018-03-04 13:57:44 +01:00
c2dfb2ef52 Refactor timetrack subcommands output for broken pipe errors 2018-02-19 11:14:18 +01:00
ba1c6c06fa Add error chaining for compatibility with new libimagerror interface 2018-02-12 21:19:48 +01:00
77be32d80f Remove "get" iterator, store provides this now 2018-02-11 23:44:27 +01:00
d5a9e4930d Update dates in license header
And add missing header in one file
2018-02-07 02:48:53 +01:00
9308c05057 Replace uses of try!() macro with "?" operator 2017-10-31 15:04:50 +01:00
fabb990336 Remove unused imports 2017-08-31 10:57:19 +02:00
ef93cf0243 libimagentrytimetrack -> libimagtimetrack
This is actually a domain library and thus should be put into the
lib/domain/ folder.
2017-08-27 18:23:47 +02:00
59a3662ac4 Reorganize code in subdirs 2017-08-27 15:12:09 +02:00
Renamed from imag-timetrack/src/year.rs (Browse further)