mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +03:00
run rustfmt
This commit is contained in:
15
src/dc_qr.rs
15
src/dc_qr.rs
@@ -223,16 +223,14 @@ pub unsafe fn dc_check_qr(context: &Context, qr: *const libc::c_char) -> *mut dc
|
||||
if strlen(fingerprint) != 40 {
|
||||
(*qr_parsed).state = 400i32;
|
||||
(*qr_parsed).text1 = dc_strdup(
|
||||
b"Bad fingerprint length in QR code.\x00" as *const u8
|
||||
as *const libc::c_char,
|
||||
b"Bad fingerprint length in QR code.\x00" as *const u8 as *const libc::c_char,
|
||||
);
|
||||
return cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
if !fingerprint.is_null() {
|
||||
let peerstate =
|
||||
Peerstate::from_fingerprint(context, &context.sql, as_str(fingerprint));
|
||||
let peerstate = Peerstate::from_fingerprint(context, &context.sql, as_str(fingerprint));
|
||||
if addr.is_null() || invitenumber.is_null() || auth.is_null() {
|
||||
if let Some(peerstate) = peerstate {
|
||||
(*qr_parsed).state = 210i32;
|
||||
@@ -272,13 +270,8 @@ pub unsafe fn dc_check_qr(context: &Context, qr: *const libc::c_char) -> *mut dc
|
||||
} else {
|
||||
(*qr_parsed).state = 200i32
|
||||
}
|
||||
(*qr_parsed).id = dc_add_or_lookup_contact(
|
||||
context,
|
||||
name,
|
||||
addr,
|
||||
0x80i32,
|
||||
0 as *mut libc::c_int,
|
||||
);
|
||||
(*qr_parsed).id =
|
||||
dc_add_or_lookup_contact(context, name, addr, 0x80i32, 0 as *mut libc::c_int);
|
||||
(*qr_parsed).fingerprint = dc_strdup(fingerprint);
|
||||
(*qr_parsed).invitenumber = dc_strdup(invitenumber);
|
||||
(*qr_parsed).auth = dc_strdup(auth)
|
||||
|
||||
Reference in New Issue
Block a user