Commit graph

25 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
9fca66aa89 Forbid unsafe code in all crates 2018-11-11 13:05:55 +01:00
8e1768b424 Refactor code to be more idomatic
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-07 11:52:31 +01:00
344aae5f92 Add ID reporting in imag-bookmark 2018-11-06 20:33:30 +01:00
1362a3f9ea imag-bookmark: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:29 +01:00
eb682d76e8 Prettify error messages 2018-06-15 22:07:13 +02:00
8c1b4124c0 Handle unknown subcommands in binaries with Runtime::handle_unknown_subcommand 2018-04-04 19:34:13 +02:00
50461b839a Use output stream from Runtime::stdout() 2018-03-04 13:57:44 +01:00
23e0f720e5 Fix broken pipe errors 2018-02-19 11:14:18 +01:00
3341e3640c
Merge pull request #1224 from matthiasbeyer/git-version-in-version
Git version in version
2018-02-18 20:03:09 +01:00
9469693763 Use new make_imag_version!() macro for building version string 2018-02-13 11:38:34 +01:00
86abfb88a4 Fix imag-bookmark error handling 2018-02-12 21:19:48 +01:00
d5a9e4930d Update dates in license header
And add missing header in one file
2018-02-07 02:48:53 +01:00
137680498c imag-bookmark: Replace read with typed read 2018-01-13 01:14:03 +01:00
bfc35e0517 Remove dependency "version"
Because the "version" crate is licensed as GPL, which would us require
to release imag as GPL, we remove the crate now.
2018-01-12 13:33:40 +01:00
95e861b5ca Adapt for new API 2018-01-08 15:16:14 +01:00
1dda98e17e Replace uses of try!() macro with "?" operator 2017-10-31 15:04:50 +01:00
b237adfe19 Fix calls to Runtime::config() to use direct result 2017-10-31 09:25:14 +01:00
169107d569 Remove FoldResult 2017-09-30 10:45:10 +02:00
d7d4d9fa7a Make default bookmark collection configurable via imagrc.toml 2017-09-15 21:46:15 +02:00
177e5bf762 Remove tagging support 2017-09-02 10:16:55 +02:00
ae5255c7c7 Remove unused crate imports
This patch removes unused crate imports reported by newer rust versions.

Some crates were only required for tests, some only for tests with
macro_import - these things were fixed with feature gates.
2017-08-31 10:56:15 +02:00
59a3662ac4 Reorganize code in subdirs 2017-08-27 15:12:09 +02:00