new_mailbox_fut?.await.map_err(|err|format!("Mailbox delete was succesful (returned `{}`) but listing mailboxes afterwards returned `{}`",response,err).into())
@ -884,7 +885,7 @@ impl MailBackend for ImapType {
new_mailbox_fut?.await.map_err(|err|format!("Mailbox rename was succesful (returned `{}`) but listing mailboxes afterwards returned `{}`",response,err))?;
"Expected tagged IMAP response (OK,NO,BAD, etc) but found {:?}",
val
)));
})
}
}
@ -295,7 +311,7 @@ impl Into<Result<()>> for ImapResponse {
#[test]
fntest_imap_response(){
assert_eq!(ImapResponse::from("M12 NO [CANNOT] Invalid mailbox name: Name must not have \'/\' characters (0.000 + 0.098 + 0.097 secs).\r\n"),ImapResponse::No(ResponseCode::Alert("Invalid mailbox name: Name must not have '/' characters".to_string())));
assert_eq!(ImapResponse::try_from("M12 NO [CANNOT] Invalid mailbox name: Name must not have \'/\' characters (0.000 + 0.098 + 0.097 secs).\r\n").unwrap(),ImapResponse::No(ResponseCode::Alert("Invalid mailbox name: Name must not have '/' characters".to_string())));