Reimplement IsInDiary for StoreId with StoreId::is_in_collection()

This commit is contained in:
Matthias Beyer 2016-08-28 14:18:29 +02:00
parent b1898887c2
commit 8563e0d4fc

View file

@ -18,7 +18,7 @@ impl IsInDiary for Entry {
impl IsInDiary for StoreId {
fn is_in_diary(&self, name: &str) -> bool {
self.to_str().map(|s| s.contains(name)).unwrap_or(false)
self.is_in_collection(&["diary", name])
}
}