Rename alike to compatible
This commit is contained in:
parent
02fb023ad1
commit
8a1447334e
@ -41,11 +41,11 @@ pub struct AlbumId {
|
||||
}
|
||||
|
||||
impl AlbumId {
|
||||
pub fn alike(&self, other: &AlbumId) -> bool {
|
||||
let titles_alike = self.title == other.title;
|
||||
let lib_id_alike =
|
||||
pub fn compatible(&self, other: &AlbumId) -> bool {
|
||||
let titles_compatible = self.title == other.title;
|
||||
let lib_id_compatible =
|
||||
self.lib_id.is_none() || other.lib_id.is_none() || (self.lib_id == other.lib_id);
|
||||
titles_alike && lib_id_alike
|
||||
titles_compatible && lib_id_compatible
|
||||
}
|
||||
}
|
||||
|
||||
@ -268,7 +268,7 @@ impl Ord for AlbumMeta {
|
||||
|
||||
impl Merge for AlbumMeta {
|
||||
fn merge_in_place(&mut self, other: Self) {
|
||||
assert!(self.id.alike(&other.id));
|
||||
assert!(self.id.compatible(&other.id));
|
||||
|
||||
self.seq = std::cmp::max(self.seq, other.seq);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user