no let else :(

This commit is contained in:
Floris Bruynooghe
2023-02-14 13:29:55 +01:00
parent d56e05a11a
commit 19f6f89312
2 changed files with 6 additions and 4 deletions

View File

@@ -297,8 +297,9 @@ pub async fn get_backup(context: &Context, qr: Qr) -> Result<()> {
}
async fn get_backup_inner(context: &Context, qr: Qr) -> Result<()> {
let Qr::Backup { ticket } = qr else {
bail!("QR code for backup must be of type DCBACKUP");
let ticket = match qr {
Qr::Backup { ticket } => ticket,
_ => bail!("QR code for backup must be of type DCBACKUP"),
};
let opts = Options {
addr: ticket.addr,