Store date information when writing to database #244

Merged
wojtek merged 6 commits from 232---store-date-information-when-writing-to-database into main 2025-01-03 10:26:54 +01:00
3 changed files with 4 additions and 13 deletions
Showing only changes of commit 6329f472fc - Show all commits

View File

@ -1,7 +1,4 @@
use std::{
fmt::{self, Display},
mem,
};
use std::mem;
use crate::core::collection::{
merge::{Merge, MergeName, MergeSorted},
@ -332,12 +329,6 @@ impl AlbumId {
}
}
impl Display for AlbumId {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.title)
}
}
#[cfg(test)]
mod tests {
use crate::core::testmod::FULL_COLLECTION;

View File

@ -91,7 +91,7 @@ pub struct MergeCollections<T, IT> {
impl<T, IT> MergeCollections<T, IT>
where
T: MergeName + Merge + Ord,
T: MergeName + Merge,
IT: IntoIterator<Item = (String, Vec<T>)>,
{
pub fn merge_by_name(primary_items: &mut Vec<T>, secondary: IT) {
@ -102,7 +102,7 @@ where
assert_eq!(secondary_items.len(), 1);
primary_item.merge_in_place(secondary_items.pop().unwrap());
}
None => primary_items.append(&mut secondary_items),
None => primary_items.extend(secondary_items),
}
}
}

View File

@ -110,7 +110,7 @@ impl<Database, Library> IMusicHoardBasePrivate for MusicHoard<Database, Library>
Self::get_album_mut(artist, album_id).ok_or_else(|| {
Error::CollectionError(format!(
"album '{}' does not belong to the artist",
album_id
album_id.title
))
})
}