mirror of
https://github.com/chatmail/core.git
synced 2026-05-04 05:46:29 +03:00
Fixed clippy errors and formatting
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user