parent
8490407d2e
commit
7860b14088
4 changed files with 11 additions and 21 deletions
|
|
@ -44,6 +44,6 @@ required-features = ["default"]
|
||||||
name = "imap_integration"
|
name = "imap_integration"
|
||||||
required-features = ["default"]
|
required-features = ["default"]
|
||||||
|
|
||||||
# [patch.crates-io]
|
[patch.crates-io]
|
||||||
# # https://github.com/djc/tokio-imap/pull/115
|
# https://github.com/djc/tokio-imap/pull/115
|
||||||
# imap-proto = { git = "https://github.com/jonhoo/tokio-imap.git", branch = "moo" }
|
imap-proto = { git = "https://github.com/jonhoo/tokio-imap.git", branch = "moo" }
|
||||||
|
|
|
||||||
|
|
@ -1395,8 +1395,7 @@ impl<T: Read + Write> Connection<T> {
|
||||||
tag,
|
tag,
|
||||||
status,
|
status,
|
||||||
information,
|
information,
|
||||||
// TODO: https://github.com/djc/tokio-imap/pull/115
|
code,
|
||||||
// code,
|
|
||||||
..
|
..
|
||||||
},
|
},
|
||||||
)) => {
|
)) => {
|
||||||
|
|
@ -1404,18 +1403,11 @@ impl<T: Read + Write> Connection<T> {
|
||||||
Some(match status {
|
Some(match status {
|
||||||
Status::Bad | Status::No => Err((
|
Status::Bad | Status::No => Err((
|
||||||
status,
|
status,
|
||||||
information.map(|v| v.to_string()),
|
information.map(|v| v.into_owned()),
|
||||||
// TODO: https://github.com/djc/tokio-imap/pull/115
|
code.map(|v| v.into_owned()),
|
||||||
// code.map(|v| v.into_owned()),
|
|
||||||
None,
|
|
||||||
)),
|
)),
|
||||||
Status::Ok => Ok(()),
|
Status::Ok => Ok(()),
|
||||||
status => Err((
|
status => Err((status, None, code.map(|v| v.into_owned()))),
|
||||||
status, None,
|
|
||||||
// TODO: https://github.com/djc/tokio-imap/pull/115
|
|
||||||
// code.map(|v| v.into_owned()),
|
|
||||||
None,
|
|
||||||
)),
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Ok((..)) => None,
|
Ok((..)) => None,
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use crate::client::*;
|
||||||
use crate::error::{Error, ParseError, Result};
|
use crate::error::{Error, ParseError, Result};
|
||||||
use crate::parse::handle_unilateral;
|
use crate::parse::handle_unilateral;
|
||||||
use crate::types::*;
|
use crate::types::*;
|
||||||
use imap_proto::types::{MailboxDatum, Metadata, Response};
|
use imap_proto::types::{MailboxDatum, Metadata, Response, ResponseCode};
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
use std::sync::mpsc;
|
use std::sync::mpsc;
|
||||||
|
|
||||||
|
|
@ -200,8 +200,7 @@ impl<T: Read + Write> Session<T> {
|
||||||
{
|
{
|
||||||
match code {
|
match code {
|
||||||
None => None,
|
None => None,
|
||||||
// TODO: https://github.com/djc/tokio-imap/pull/116
|
Some(ResponseCode::MetadataLongEntries(v)) => Some(v),
|
||||||
// Some(ResponseCode::MetadataLongEntries(v)) => Some(v),
|
|
||||||
Some(_) => None,
|
Some(_) => None,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
use imap_proto::{MailboxDatum, Response, ResponseCode};
|
use imap_proto::{MailboxDatum, Response, ResponseCode};
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use std::borrow::Cow;
|
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use std::sync::mpsc;
|
use std::sync::mpsc;
|
||||||
|
|
||||||
|
|
@ -81,8 +80,8 @@ pub fn parse_names(
|
||||||
name,
|
name,
|
||||||
}) => Ok(MapOrNot::Map(Name {
|
}) => Ok(MapOrNot::Map(Name {
|
||||||
attributes: flags.into_iter().map(NameAttribute::from).collect(),
|
attributes: flags.into_iter().map(NameAttribute::from).collect(),
|
||||||
delimiter: delimiter.map(Cow::Borrowed),
|
delimiter,
|
||||||
name: Cow::Borrowed(name),
|
name,
|
||||||
})),
|
})),
|
||||||
resp => Ok(MapOrNot::Not(resp)),
|
resp => Ok(MapOrNot::Not(resp)),
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue