Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Sep 19, 2022
1 parent c792165 commit 5da980e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions deltachat-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2154,7 +2154,7 @@ pub unsafe extern "C" fn dc_send_backup(
.await
.map(|transfer| Box::into_raw(Box::new(dc_backup_sender { transfer })))
.log_err(ctx, "send_backup failed")
.unwrap_or_else(|_| ptr::null_mut())
.unwrap_or(ptr::null_mut())
})
} else {
eprintln!("dc_imex called without a valid directory");
Expand All @@ -2179,10 +2179,10 @@ pub unsafe extern "C" fn dc_backup_sender_qr(
let bs = &*bs;
let ticket = bs.transfer.ticket();

qr_code_generator::generate_backup_qr_code(&ticket)
qr_code_generator::generate_backup_qr_code(ticket)
.map(|s| s.strdup())
.log_err(ctx, "generate_backup_qr_code failed")
.unwrap_or_else(|_| ptr::null_mut())
.unwrap_or(ptr::null_mut())
}

#[no_mangle]
Expand Down
2 changes: 1 addition & 1 deletion examples/repl/cmdline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
let tdir = tempfile::TempDir::new()?;
let dir = tdir.path();
println!("Storing backup in: {} ", dir.display());
let transfer = send_backup(&context, dir.as_ref(), Some(arg1.to_string())).await?;
let transfer = send_backup(&context, dir, Some(arg1.to_string())).await?;
let ticket = transfer.ticket();
let ticket_bytes = ticket.as_bytes();

Expand Down
2 changes: 1 addition & 1 deletion src/imex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ async fn export_backup_iroh_inner(
dir_builder.name(
temp_path
.file_name()
.map(|s| s.to_string_lossy().to_owned())
.map(|s| s.to_string_lossy())
.unwrap_or_default(),
);

Expand Down

0 comments on commit 5da980e

Please sign in to comment.