mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 23:36:30 +03:00
remove duplicated code
This commit is contained in:
committed by
Floris Bruynooghe
parent
1908ac428b
commit
bb08b39c71
@@ -24,7 +24,9 @@ use num_traits::{FromPrimitive, ToPrimitive};
|
|||||||
|
|
||||||
use deltachat::contact::Contact;
|
use deltachat::contact::Contact;
|
||||||
use deltachat::context::Context;
|
use deltachat::context::Context;
|
||||||
use deltachat::dc_tools::{as_path, as_str, dc_strdup, to_string_lossy, OsStrExt, StrExt};
|
use deltachat::dc_tools::{
|
||||||
|
as_opt_str, as_path, as_str, dc_strdup, to_string_lossy, OsStrExt, StrExt,
|
||||||
|
};
|
||||||
use deltachat::stock::StockMessage;
|
use deltachat::stock::StockMessage;
|
||||||
use deltachat::*;
|
use deltachat::*;
|
||||||
|
|
||||||
@@ -2920,14 +2922,6 @@ pub unsafe extern "C" fn dc_str_unref(s: *mut libc::c_char) {
|
|||||||
libc::free(s as *mut _)
|
libc::free(s as *mut _)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn as_opt_str<'a>(s: *const libc::c_char) -> Option<&'a str> {
|
|
||||||
if s.is_null() {
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
|
|
||||||
Some(as_str(s))
|
|
||||||
}
|
|
||||||
|
|
||||||
pub mod providers;
|
pub mod providers;
|
||||||
|
|
||||||
pub trait ResultExt<T> {
|
pub trait ResultExt<T> {
|
||||||
|
|||||||
Reference in New Issue
Block a user