mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
no let else :(
This commit is contained in:
@@ -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?;
|
||||
|
||||
Reference in New Issue
Block a user