> >  
> > -                if Some(codename) == current_codename.next() {
> > -                    add_info("ignore-pre-upgrade-warning", 
> > message_new(base_suite));
> > -                } else if codename > current_codename {
> > -                    add_info("warning", message_new(base_suite));
> > +                match current_codename.next() {
> > +                    name if name == codename => {
> > +                        add_info("ignore-pre-upgrade-warning", 
> > message_new(base_suite));
> > +                    }
> > +                    DebianCodename::Unknown(_, _) if codename > 
> > current_codename => {
> > +                        add_info("warning", message_new(base_suite));
> > +                    }
> > +                    _ => {}
> 
> Like this, the warning is lost when we match a known codename that is
> newer than the current one. What is the issue with the current code you
> are trying to address?

There is no issue with the current code, I just refactored it to use the newly 
introduced variant instead of the Option.
Am I missing something? This should behave just like the code before.

> 
> As for the match, you could pull in the case where the suite is older
> (the if block just above this code) and rather do an exhaustive match.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to