mirror of
https://git.meli.delivery/meli/meli
synced 2024-10-30 21:20:34 +00:00
Fix test errors and warnings
This commit is contained in:
parent
023afbaae3
commit
a7c0bca8ce
@ -324,14 +324,12 @@ fn print_attachment(ret: &mut String, a: AttachmentBuilder) {
|
|||||||
ret.push_str(line);
|
ret.push_str(line);
|
||||||
ret.push_str("\r\n");
|
ret.push_str("\r\n");
|
||||||
}
|
}
|
||||||
ret.push_str("\r\n");
|
|
||||||
}
|
}
|
||||||
Text { .. } => {
|
Text { .. } => {
|
||||||
for line in a.build().into_raw().lines() {
|
for line in a.build().into_raw().lines() {
|
||||||
ret.push_str(line);
|
ret.push_str(line);
|
||||||
ret.push_str("\r\n");
|
ret.push_str("\r\n");
|
||||||
}
|
}
|
||||||
ret.push_str("\r\n");
|
|
||||||
}
|
}
|
||||||
Multipart {
|
Multipart {
|
||||||
boundary: _,
|
boundary: _,
|
||||||
@ -346,7 +344,6 @@ fn print_attachment(ret: &mut String, a: AttachmentBuilder) {
|
|||||||
.map(|s| s.into())
|
.map(|s| s.into())
|
||||||
.collect::<Vec<AttachmentBuilder>>(),
|
.collect::<Vec<AttachmentBuilder>>(),
|
||||||
);
|
);
|
||||||
ret.push_str("\r\n");
|
|
||||||
}
|
}
|
||||||
MessageRfc822 => {
|
MessageRfc822 => {
|
||||||
ret.push_str(&format!(
|
ret.push_str(&format!(
|
||||||
@ -359,7 +356,6 @@ fn print_attachment(ret: &mut String, a: AttachmentBuilder) {
|
|||||||
ret.push_str(line);
|
ret.push_str(line);
|
||||||
ret.push_str("\r\n");
|
ret.push_str("\r\n");
|
||||||
}
|
}
|
||||||
ret.push_str("\r\n");
|
|
||||||
}
|
}
|
||||||
PGPSignature => {
|
PGPSignature => {
|
||||||
ret.push_str(&format!(
|
ret.push_str(&format!(
|
||||||
@ -373,7 +369,6 @@ fn print_attachment(ret: &mut String, a: AttachmentBuilder) {
|
|||||||
ret.push_str(line);
|
ret.push_str(line);
|
||||||
ret.push_str("\r\n");
|
ret.push_str("\r\n");
|
||||||
}
|
}
|
||||||
ret.push_str("\r\n");
|
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let content_transfer_encoding: ContentTransferEncoding = if a.raw().is_ascii() {
|
let content_transfer_encoding: ContentTransferEncoding = if a.raw().is_ascii() {
|
||||||
@ -410,7 +405,6 @@ fn print_attachment(ret: &mut String, a: AttachmentBuilder) {
|
|||||||
ret.push_str("\r\n");
|
ret.push_str("\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret.push_str("\r\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ fn test_encode_header() {
|
|||||||
)
|
)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
);
|
);
|
||||||
let words = "[Advcomparch] =?utf-8?b?zqPPhc68z4DOtc+BzrnPhs6/z4HOrCDPg861IGZs?=\n\t=?utf-8?b?dXNoIM67z4zOs8+JIG1pc3ByZWRpY3Rpb24gzrrOsc+Ezqwgz4TOt869?=\n\t=?utf-8?b?IM61zrrPhM6tzrvOtc+Dzrcgc3RvcmU=?=";
|
//let words = "[Advcomparch] =?utf-8?b?zqPPhc68z4DOtc+BzrnPhs6/z4HOrCDPg861IGZs?=\n\t=?utf-8?b?dXNoIM67z4zOs8+JIG1pc3ByZWRpY3Rpb24gzrrOsc+Ezqwgz4TOt869?=\n\t=?utf-8?b?IM61zrrPhM6tzrvOtc+Dzrcgc3RvcmU=?=";
|
||||||
let words_enc = "[Advcomparch] Συμπεριφορά σε flush λόγω misprediction κατά την εκτέλεση store";
|
let words_enc = "[Advcomparch] Συμπεριφορά σε flush λόγω misprediction κατά την εκτέλεση store";
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
"[Advcomparch] Συμπεριφορά σε flush λόγω misprediction κατά την εκτέλεση store",
|
"[Advcomparch] Συμπεριφορά σε flush λόγω misprediction κατά την εκτέλεση store",
|
||||||
|
@ -1200,8 +1200,8 @@ List-Archive: <http://www.host.com/list/archive/> (Web Archive)
|
|||||||
"#;
|
"#;
|
||||||
let (rest, headers) = headers::headers(s.as_bytes()).unwrap();
|
let (rest, headers) = headers::headers(s.as_bytes()).unwrap();
|
||||||
assert!(rest.is_empty());
|
assert!(rest.is_empty());
|
||||||
for (h, v) in headers {
|
for (_h, v) in headers {
|
||||||
let (rest, action_list) = rfc_2369_list_headers_action_list(v).unwrap();
|
let (rest, _action_list) = rfc_2369_list_headers_action_list(v).unwrap();
|
||||||
assert!(rest.is_empty());
|
assert!(rest.is_empty());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2486,7 +2486,7 @@ pub mod address {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::{address::*, encodings::*, generic::*, *};
|
use super::{address::*, encodings::*, *};
|
||||||
use crate::email::address::*;
|
use crate::email::address::*;
|
||||||
use crate::make_address;
|
use crate::make_address;
|
||||||
|
|
||||||
|
@ -38,4 +38,4 @@ XKKGGn7Akph/8XX2WDTTcAYfguVt9hhrEPqmzIOJ3VUheb48WJiHG6amC4i+WVJKKCimqGIoYxyj
|
|||||||
WWK8kKjaJ9bA18sxvXjYhourmbbMMrjI+OIn1QymDCVXANGFK4S1gQw0PxozzC+33FLLKUJq9gk1
|
WWK8kKjaJ9bA18sxvXjYhourmbbMMrjI+OIn1QymDCVXANGFK4S1gQw0PxozzC+33FLLKUJq9gk1
|
||||||
gyWDhyNwrMLkYGUEM4wvuLRiCiieXIJJJVlmJskcZ9TZRht1lnFGGmTMkMoonVQSSSOFAGJHHI0w
|
gyWDhyNwrMLkYGUEM4wvuLRiCiieXIJJJVlmJskcZ9TZRht1lnFGGmTMkMoonVQSSSOFAGJHHI0w
|
||||||
ouiijDaaCCGQRgrpH3q4QYYXWDihxBE+7KCDDjnUIEVAADs=
|
ouiijDaaCCGQRgrpH3q4QYYXWDihxBE+7KCDDjnUIEVAADs=
|
||||||
--bzz_bzz__bzz__--
|
--bzz_bzz__bzz__--
|
||||||
|
@ -17,6 +17,7 @@ fn main() -> Result<()> {
|
|||||||
username: "username".into(),
|
username: "username".into(),
|
||||||
password: Password::CommandEval("gpg2 --no-tty -q -d ~/.passwords/password.gpg".into()),
|
password: Password::CommandEval("gpg2 --no-tty -q -d ~/.passwords/password.gpg".into()),
|
||||||
require_auth: true,
|
require_auth: true,
|
||||||
|
auth_type: Default::default(),
|
||||||
},
|
},
|
||||||
envelope_from: String::new(),
|
envelope_from: String::new(),
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user