Base IsInDiary::is_in_diary() on StoreId::is_in_collection(), which is tested

This commit is contained in:
Matthias Beyer 2017-09-20 18:48:55 +02:00
parent 4b906f27b1
commit da4d670cbc
1 changed files with 2 additions and 2 deletions

View File

@ -43,11 +43,11 @@ impl IsInDiary for Entry {
impl IsInDiary for StoreId {
fn is_in_diary(&self, name: &str) -> bool {
self.local().starts_with(format!("diary/{}", name))
self.is_in_collection(&["diary", name])
}
fn is_a_diary_entry(&self) -> bool {
self.local().starts_with("diary")
self.is_in_collection(&["diary"])
}
}