mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
address three comments from @dignifiedquire
This commit is contained in:
@@ -909,7 +909,7 @@ unsafe fn import_self_keys(context: &Context, dir_name: *const libc::c_char) ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
set_default = 1;
|
set_default = 1;
|
||||||
if name_f.find("legacy").is_some() {
|
if name_f.contains("legacy") {
|
||||||
info!(
|
info!(
|
||||||
context,
|
context,
|
||||||
"Treating \"{}\" as a legacy private key.",
|
"Treating \"{}\" as a legacy private key.",
|
||||||
|
|||||||
@@ -788,8 +788,10 @@ fn build_body_text(text: &str) -> *mut mailmime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn set_body_text(part: *mut mailmime, text: &str) {
|
fn set_body_text(part: *mut mailmime, text: &str) {
|
||||||
|
use libc::strlen;
|
||||||
unsafe {
|
unsafe {
|
||||||
mailmime_set_body_text(part, text.strdup(), text.len());
|
let text_c = text.strdup();
|
||||||
|
mailmime_set_body_text(part, text_c, strlen(text_c));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -909,7 +911,7 @@ fn build_body_file(context: &Context, msg: &Message, base_name: &str) -> (*mut m
|
|||||||
pub(crate) fn vec_contains_lowercase(vec: &Vec<String>, part: &str) -> bool {
|
pub(crate) fn vec_contains_lowercase(vec: &Vec<String>, part: &str) -> bool {
|
||||||
let partlc = part.to_lowercase();
|
let partlc = part.to_lowercase();
|
||||||
for cur in vec.iter() {
|
for cur in vec.iter() {
|
||||||
if (*cur).to_lowercase() == partlc {
|
if cur.to_lowercase() == partlc {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user