summaryrefslogtreecommitdiffstats
path: root/lib/entry/libimagentryannotation/src/annotation_fetcher.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2017-08-26 17:53:08 +0200
committerMatthias Beyer <mail@beyermatthias.de>2017-08-28 12:22:37 +0200
commitc0c62bd1b5c5b9ece1d8289721dc8617987a7885 (patch)
tree34b1acf7872eb10db152c0c1a9bf96bf52027e4a /lib/entry/libimagentryannotation/src/annotation_fetcher.rs
parent3024fefcb9d338919e0a3b5b1b90fb77d2313330 (diff)
Change crates to use toml-query crate
Diffstat (limited to 'lib/entry/libimagentryannotation/src/annotation_fetcher.rs')
-rw-r--r--lib/entry/libimagentryannotation/src/annotation_fetcher.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/entry/libimagentryannotation/src/annotation_fetcher.rs b/lib/entry/libimagentryannotation/src/annotation_fetcher.rs
index 18c4a8be..58b27170 100644
--- a/lib/entry/libimagentryannotation/src/annotation_fetcher.rs
+++ b/lib/entry/libimagentryannotation/src/annotation_fetcher.rs
@@ -68,7 +68,8 @@ impl<'a> AnnotationFetcher<'a> for Store {
pub mod iter {
use toml::Value;
- use libimagstore::toml_ext::TomlValueExt;
+ use toml_query::read::TomlValueReadExt;
+
use libimagerror::into::IntoError;
use libimagnotes::note::Note;
use libimagnotes::note::NoteIterator;
@@ -95,10 +96,9 @@ pub mod iter {
loop {
match self.0.next() {
Some(Ok(note)) => {
- let hdr = note.get_header().read("annotation.is_annotation");
- match hdr {
+ match note.get_header().read("annotation.is_annotation") {
Ok(None) => continue, // not an annotation
- Ok(Some(Value::Boolean(true))) => return Some(Ok(note)),
+ Ok(Some(&Value::Boolean(true))) => return Some(Ok(note)),
Ok(Some(_)) => return Some(Err(AEK::HeaderTypeError.into_error())),
Err(e) => return Some(Err(e).map_err_into(AEK::HeaderReadError)),
}