mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 01:16:31 +03:00
Fix one clippy::unneeded_unwrap warning
This commit is contained in:
@@ -300,9 +300,11 @@ pub unsafe fn dc_open(context: &Context, dbfile: &str, blobdir: Option<&str>) ->
|
|||||||
if 0 != dc_is_open(context) {
|
if 0 != dc_is_open(context) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
*context.dbfile.write().unwrap() = Some(PathBuf::from(dbfile));
|
*context.dbfile.write().unwrap() = Some(PathBuf::from(dbfile));
|
||||||
if blobdir.is_some() && !blobdir.unwrap().is_empty() {
|
let blobdir = blobdir.unwrap_or_default();
|
||||||
let dir = dc_ensure_no_slash_safe(blobdir.unwrap()).strdup();
|
if !blobdir.is_empty() {
|
||||||
|
let dir = dc_ensure_no_slash_safe(blobdir).strdup();
|
||||||
*context.blobdir.write().unwrap() = dir;
|
*context.blobdir.write().unwrap() = dir;
|
||||||
} else {
|
} else {
|
||||||
let dir = dbfile.to_string() + "-blobs";
|
let dir = dbfile.to_string() + "-blobs";
|
||||||
|
|||||||
Reference in New Issue
Block a user