mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +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;
|
||||
if name_f.find("legacy").is_some() {
|
||||
if name_f.contains("legacy") {
|
||||
info!(
|
||||
context,
|
||||
"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) {
|
||||
use libc::strlen;
|
||||
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 {
|
||||
let partlc = part.to_lowercase();
|
||||
for cur in vec.iter() {
|
||||
if (*cur).to_lowercase() == partlc {
|
||||
if cur.to_lowercase() == partlc {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user