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

@@ -57,8 +57,9 @@ async fn generate_verification_qr(context: &Context) -> Result<String> {
}
pub async fn generate_backup_qr(context: &Context, qr: &Qr) -> Result<String> {
let Qr::Backup { ticket } = qr else {
bail!("QR code not a backup");
let ticket = match qr {
Qr::Backup { ticket } => ticket,
_ => bail!("QR code not a backup"),
};
let content = format!("{DCBACKUP_SCHEME}{ticket}");
let (avatar, displayname, _addr, color) = self_info(context).await?;