Integrate browse API into TUI MB daemon #230

Merged
wojtek merged 15 commits from 160---provide-a-keyboard-shortcut-to-pull-all-release-groups-of-an-artist into main 2024-10-06 15:32:46 +02:00
Showing only changes of commit e6c440ecc5 - Show all commits

View File

@ -47,13 +47,9 @@ pub enum MbRefOption<T> {
impl<T> MbRefOption<T> { impl<T> MbRefOption<T> {
pub fn or(self, optb: MbRefOption<T>) -> MbRefOption<T> { pub fn or(self, optb: MbRefOption<T>) -> MbRefOption<T> {
match self { match (&self, &optb) {
opta @ MbRefOption::Some(_) => opta, (MbRefOption::Some(_), _) | (MbRefOption::CannotHaveMbid, MbRefOption::None) => self,
opta @ MbRefOption::CannotHaveMbid => match optb { _ => optb,
MbRefOption::Some(_) => optb,
MbRefOption::CannotHaveMbid | MbRefOption::None => opta,
},
MbRefOption::None => optb,
} }
} }