mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-10-11 04:55:51 +08:00
Fixed bodystructure tests
This commit is contained in:
parent
b5f2af7d6a
commit
0cd010f8ec
3 changed files with 7 additions and 3 deletions
|
@ -600,7 +600,7 @@ impl SessionData {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
trait AsImapDataItem<'x> {
|
pub trait AsImapDataItem<'x> {
|
||||||
fn body_structure(&self, is_extended: bool) -> BodyPart;
|
fn body_structure(&self, is_extended: bool) -> BodyPart;
|
||||||
fn body_section<'z: 'x>(
|
fn body_section<'z: 'x>(
|
||||||
&'z self,
|
&'z self,
|
||||||
|
|
|
@ -350,7 +350,7 @@ impl SessionData {
|
||||||
}
|
}
|
||||||
Err(MethodError::ServerUnavailable) => {
|
Err(MethodError::ServerUnavailable) => {
|
||||||
response.rtype = ResponseType::No;
|
response.rtype = ResponseType::No;
|
||||||
response.message = "Some messaged could not be updated.".into();
|
response.message = "Some messages could not be updated.".into();
|
||||||
}
|
}
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
return Err(StatusResponse::database_failure()
|
return Err(StatusResponse::database_failure()
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
use std::{fs, path::PathBuf};
|
use std::{fs, path::PathBuf};
|
||||||
|
|
||||||
use imap_proto::protocol::fetch::Section;
|
use imap::op::fetch::AsImapDataItem;
|
||||||
|
use imap_proto::{
|
||||||
|
protocol::fetch::{BodyContents, DataItem, Section},
|
||||||
|
ResponseCode, StatusResponse,
|
||||||
|
};
|
||||||
use mail_parser::Message;
|
use mail_parser::Message;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Add table
Reference in a new issue