Merge pull request #1306 from matthiasbeyer/minor

Minor patches
This commit is contained in:
Matthias Beyer 2018-02-20 20:23:41 +01:00 committed by GitHub
commit b2048b3dcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 1 deletions

View file

@ -198,7 +198,7 @@ fn main() {
.map(|v| v.stdout)
{
Ok(s) => match String::from_utf8(s) {
Ok(s) => format!("{:10} -> {}", command, s),
Ok(s) => format!("{:15} -> {}", command, s),
Err(e) => format!("UTF8 Error while working with output of imag{}: {:?}", command, e),
},
Err(e) => format!("Failed calling imag-{} -> {:?}", command, e),

View file

@ -52,6 +52,12 @@ This section contains the changelog from the last release to the next release.
For that, `libimagerror` got a `Result` extension which can translate
errors into exit codes and one for unwrapping or exiting with the
`Err(i32)` from the result.
* `libimagdiary` did not add the header markers on diary entries.
* `imag-diary` used the default diary rather than the CLI setting. Now it
rather uses the CLI setting and only if that is not present, it uses the
default.
* `libimagerror` printed errors with `write!()` rather than `writeln!()`
when tracing.
## 0.6.1

View file

@ -88,6 +88,7 @@ impl Diary for Store {
// Get an iterator for iterating over all entries
fn entries(&self, diary_name: &str) -> Result<DiaryEntryIterator> {
debug!("Building iterator for module 'diary' with diary name = '{}'", diary_name);
self.retrieve_for_module("diary")
.map(|iter| DiaryEntryIterator::new(self, String::from(diary_name), iter))
.chain_err(|| DEK::StoreReadError)

View file

@ -43,6 +43,7 @@ impl IsInDiary for Entry {
impl IsInDiary for StoreId {
fn is_in_diary(&self, name: &str) -> bool {
debug!("Check: is in diary '{}'", name);
self.is_in_collection(&["diary", name])
}