Fixed clippy errors and formatting

This commit is contained in:
flipsimon
2022-07-29 13:19:45 +02:00
parent 05629fe814
commit b913c141d2
3 changed files with 385 additions and 105 deletions

View File

@@ -204,7 +204,6 @@ impl CommandApi {
}
async fn check_qr(&self, account_id: u32, qr_content: String) -> Result<QrObject> {
println!("HELLO FROM CHECK_QR");
let ctx = self.get_context(account_id).await?;
let qr = qr::check_qr(&ctx, &qr_content).await?;
let qr_object = QrObject::from(qr);

View File

@@ -137,16 +137,10 @@ impl From<Qr> for QrObject {
QrObject::FprOk { contact_id }
}
Qr::FprMismatch { contact_id } => {
let contact_id = match contact_id {
Some(contact_id) => Some(contact_id.to_u32()),
None => None,
};
let contact_id = contact_id.map(|contact_id| contact_id.to_u32());
QrObject::FprMismatch { contact_id }
}
Qr::FprWithoutAddr { fingerprint } => {
let fingerprint = fingerprint.to_string();
QrObject::FprWithoutAddr { fingerprint }
}
Qr::FprWithoutAddr { fingerprint } => QrObject::FprWithoutAddr { fingerprint },
Qr::Account { domain } => QrObject::Account { domain },
Qr::WebrtcInstance {
domain,