Add debugging in lib-iter
This commit is contained in:
parent
cf6d03ca03
commit
4a134144d1
1 changed files with 3 additions and 0 deletions
|
@ -82,15 +82,18 @@ impl<'a> Iterator for DiaryEntryIterator<'a> {
|
||||||
debug!("Seems to be in diary: {:?}", next);
|
debug!("Seems to be in diary: {:?}", next);
|
||||||
let id = DiaryId::from_storeid(&next);
|
let id = DiaryId::from_storeid(&next);
|
||||||
if id.is_none() {
|
if id.is_none() {
|
||||||
|
debug!("Couldn't parse {:?} into DiaryId", next);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let id = id.unwrap();
|
let id = id.unwrap();
|
||||||
|
debug!("Success parsing id = {:?}", id);
|
||||||
|
|
||||||
let y = match self.year { None => true, Some(y) => y == id.year() };
|
let y = match self.year { None => true, Some(y) => y == id.year() };
|
||||||
let m = match self.month { None => true, Some(m) => m == id.month() };
|
let m = match self.month { None => true, Some(m) => m == id.month() };
|
||||||
let d = match self.day { None => true, Some(d) => d == id.day() };
|
let d = match self.day { None => true, Some(d) => d == id.day() };
|
||||||
|
|
||||||
if y && m && d {
|
if y && m && d {
|
||||||
|
debug!("Return = {:?}", id);
|
||||||
return Some(self
|
return Some(self
|
||||||
.store
|
.store
|
||||||
.retrieve(next)
|
.retrieve(next)
|
||||||
|
|
Loading…
Reference in a new issue